We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 708dbcb commit d11f5f6Copy full SHA for d11f5f6
quickjs.c
@@ -32,6 +32,9 @@
32
#include <assert.h>
33
#if !defined(_MSC_VER)
34
#include <sys/time.h>
35
+#if defined(_WIN32)
36
+#include <timezoneapi.h>
37
+#endif
38
#endif
39
#include <time.h>
40
#include <fenv.h>
@@ -40827,8 +40830,9 @@ static const JSCFunctionListEntry js_math_obj[] = {
40827
40830
between UTC time and local time 'd' in minutes */
40828
40831
static int getTimezoneOffset(int64_t time) {
40829
40832
#if defined(_WIN32)
- /* XXX: TODO */
- return 0;
40833
+ TIME_ZONE_INFORMATION time_zone_info;
40834
+ GetTimeZoneInformation(&time_zone_info);
40835
+ return (int)time_zone_info.Bias / 60;
40836
#else
40837
time_t ti;
40838
struct tm tm;
0 commit comments