* for the input Epoch time, returns the correct timezone offset of local time zone; * return value is in seconds e.g. -28800 (that would be -8 hrs) */
| 356 | * return value is in seconds e.g. -28800 (that would be -8 hrs) |
| 357 | */ |
| 358 | double __hxcpp_timezone_offset(double inSeconds) |
| 359 | { |
| 360 | struct tm localTime; |
| 361 | __internal_localtime( inSeconds, &localTime); |
| 362 | |
| 363 | #if defined(HX_WINDOWS) || defined(__SNC__) || defined(__ORBIS__) |
| 364 | struct tm gmTime; |
| 365 | __internal_gmtime(inSeconds, &gmTime ); |
| 366 | |
| 367 | return mktime(&localTime) - mktime(&gmTime); |
| 368 | #else |
| 369 | return localTime.tm_gmtoff; |
| 370 | #endif |
| 371 | } |
| 372 | |
| 373 | String __internal_to_string(struct tm time) |
| 374 | { |
no test coverage detected