| 77 | } |
| 78 | |
| 79 | void utc_time(Time &time) |
| 80 | { |
| 81 | #if CROWN_PLATFORM_WINDOWS |
| 82 | SYSTEMTIME now; |
| 83 | GetSystemTime(&now); |
| 84 | time.hour = now.wHour; |
| 85 | time.minutes = now.wMinute; |
| 86 | time.seconds = now.wSecond; |
| 87 | #else |
| 88 | time_t t; |
| 89 | struct tm now; |
| 90 | ::time(&t); |
| 91 | gmtime_r(&t, &now); |
| 92 | time.hour = now.tm_hour; |
| 93 | time.minutes = now.tm_min; |
| 94 | time.seconds = now.tm_sec; |
| 95 | #endif |
| 96 | } |
| 97 | |
| 98 | const char *to_string(char *buf, u32 len, const Date &date) |
| 99 | { |