* input: takes Y-M-D h:m:s.ms (considers that date parts are in UTC date_time representation) * output: returns UTC time stamp (Epoch), in seconds */
| 406 | * output: returns UTC time stamp (Epoch), in seconds |
| 407 | */ |
| 408 | double __hxcpp_from_utc(int inYear,int inMonth,int inDay,int inHour, int inMin, int inSeconds, int inMilliseconds) |
| 409 | { |
| 410 | struct tm time; |
| 411 | |
| 412 | time.tm_isdst = -1; |
| 413 | time.tm_year = inYear - 1900; |
| 414 | time.tm_mon = inMonth; |
| 415 | time.tm_mday = inDay; |
| 416 | time.tm_hour = inHour; |
| 417 | time.tm_min = inMin; |
| 418 | time.tm_sec = inSeconds; |
| 419 | |
| 420 | time_t z = mktime(&time); |
| 421 | time_t t = z + __hxcpp_timezone_offset(z); |
| 422 | |
| 423 | struct tm local_tm; |
| 424 | __internal_localtime( t, &local_tm); |
| 425 | |
| 426 | return (mktime(&local_tm) + ((double) inMilliseconds * 0.001)); |
| 427 | } |
| 428 |
nothing calls this directly
no test coverage detected