浏览代码

Add in the timezone global from time.h, from a patch by
Jon Nelson <jnelson@boa.org>

Eric Andersen 25 年之前
父节点
当前提交
089e018263
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      libc/misc/time/tm_conv.c

+ 5 - 0
libc/misc/time/tm_conv.c

@@ -81,6 +81,9 @@ static const unsigned short int __mon_lengths[2][12] = {
 	/* Leap years.  */
 	{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
 };
+/* This global is exported to the wide world in keeping
+ * with the interface in time.h */
+long int timezone;
 
 
 void __tm_conv(tmbuf, t, offset)
@@ -92,6 +95,8 @@ time_t offset;
 	register int y;
 	register const unsigned short int *ip;
 
+	timezone = offset;
+
 	days = *t / SECS_PER_DAY;
 	rem = *t % SECS_PER_DAY;
 	rem += offset;