]> git.kaiwu.me - njs.git/commitdiff
Forgotten nxt/nxt_time.h file has been added.
authorIgor Sysoev <igor@sysoev.ru>
Fri, 8 Apr 2016 15:59:06 +0000 (18:59 +0300)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 8 Apr 2016 15:59:06 +0000 (18:59 +0300)
nxt/nxt_time.h [new file with mode: 0644]

diff --git a/nxt/nxt_time.h b/nxt/nxt_time.h
new file mode 100644 (file)
index 0000000..590c328
--- /dev/null
@@ -0,0 +1,24 @@
+
+/*
+ * Copyright (C) Igor Sysoev
+ * Copyright (C) NGINX, Inc.
+ */
+
+#ifndef _NXT_TIME_H_INCLUDED_
+#define _NXT_TIME_H_INCLUDED_
+
+
+#if (NXT_HAVE_TM_GMTOFF)
+
+#define nxt_timezone(tm)                                                      \
+    ((tm)->tm_gmtoff)
+
+#elif (NXT_HAVE_ALTZONE)
+
+#define nxt_timezone(tm)                                                      \
+    (-(((tm)->tm_isdst > 0) ? altzone : timezone))
+
+#endif
+
+
+#endif /* _NXT_TIME_H_INCLUDED_ */