Commit Graph

379 Commits

Author SHA1 Message Date
ginsbach 3219a72f94 Don't attempt to set TM_ZONE (name) for 'J' as isdst isn't known. 2015-10-31 03:42:00 +00:00
christos 3c0ef4294c make %Z and %z understand the same strings. 2015-10-31 02:14:08 +00:00
ginsbach b8b1230d48 - Add reference to RFC-3339
- Add J to military / nautical time zone description
2015-10-31 02:09:06 +00:00
ginsbach fb679626c8 Add 'J' (Juliett) as military time zone name meaning the local time zone. 2015-10-30 21:36:25 +00:00
christos eff9b12acf drop stray #endif 2015-10-30 18:20:16 +00:00
christos 5ba7c63c3a revert timezone() ifdef; it is wrong (pointed out by ginsbach) 2015-10-30 18:04:42 +00:00
ginsbach 862d86e79e ISO 8601 and RFC 3339 specify that an offset can be up to 23:59 and
not 12:00 east/west.  Just proves that one shouldn't use other
implementations as a canonical reference.  Thanks to all who pointed
this out.
2015-10-30 03:18:10 +00:00
ginsbach a5eaa096be Reject timezone offsets more than 12 hours (east or west). 2015-10-30 01:49:36 +00:00
wiz 4bdb969ddc Whitespace. 2015-10-29 22:42:55 +00:00
christos fb1c722214 another lint warning for compat. 2015-10-29 19:18:32 +00:00
christos 5eac10702e - use #defined constants (from gisbach)
- back to setting tm_zone to NULL when we don't know.
2015-10-29 19:18:19 +00:00
christos 4ba084a19e PR/50380: Balazs Scheidler: strptime() returns incorrect values in tm_gmtoff
- Always offset in seconds.
- Handle arbitrary timezones.
2015-10-29 17:54:49 +00:00
christos 37de2f9dd3 Add tzgetgmtoff(3) 2015-10-29 17:53:04 +00:00
christos cefa99b2ad Document tzgetgmtoff(3) 2015-10-29 17:51:58 +00:00
christos 1aed602970 Add tzgetgmtoff, delint compat 2015-10-29 17:49:24 +00:00
christos f9589d4feb Release 2015g - 2015-10-01 00:39:51 -0700
Changes affecting code

    localtime no longer mishandles America/Anchorage after 2037.
    (Thanks to Bradley White for reporting the bug.)

    The localtime module allows the variables 'timezone', 'daylight',
    and 'altzone' to be in common storage shared with other modules,
    and declares them in case the system <time.h> does not.
    (Problems reported by Kees Dekker.)

    On platforms with tm_zone, strftime.c now assumes it is not NULL.
    This simplifies the code and is consistent with zdump.c.
    (Problem reported by Christos Zoulas.)

  Changes affecting documentation

   The tzfile man page now documents that transition times denote the
   starts (not the ends) of the corresponding time periods.
   (Ambiguity reported by Bill Seymour.)
2015-10-09 17:21:45 +00:00
riz f2164b60c8 Remove second 'const' declaration, to hopefully fix clang builds. 2015-08-18 16:54:27 +00:00
christos d856f74aad merge 2015f 2015-08-13 11:21:18 +00:00
ginsbach b6db50f38d Only apply am/pm adjustment to tm_hour when it has actually been parsed. 2015-07-29 20:32:54 +00:00
ginsbach 8b0d942b48 More KNF style changes -- consistent use of whitespace in #defines. 2015-07-22 13:33:59 +00:00
ginsbach 2cacd9205d KNF and additional comments 2015-07-20 14:37:11 +00:00
ginsbach f7bfe448b0 Don't set state when parsing any timezone (%z) information. The '+' in
this case isn't the same as the FreeBSD '%+' str[fp]time() (GNU) extension.
2015-07-15 13:54:38 +00:00
ginsbach d2fb39874a Set S_WDAY state for %u (same as it is set for %w). 2015-07-14 18:07:17 +00:00
ginsbach ad43142fb9 Switch to using isleap() and isleap_sum() macros from <tzfile.h> to be
consistent with strftime.c and localtime.c.
2015-07-13 17:45:16 +00:00
christos 68ac8e89d0 remove local copy of tzfile.h 2015-07-11 16:41:08 +00:00
christos b999beb0fa - don't copy the man pages anymore. they have been converted to mdoc
format.
- don't delete extra files, but mention the 'import' process
2015-07-11 16:09:15 +00:00
ginsbach 700896bffd Add macros to clarify what (parse) state is needed to calculate 'missing'
tm fields.
2015-07-08 19:48:20 +00:00
ginsbach 6d93b92ef8 Rename flags to state since that is really what flags tracks (parse state). 2015-07-08 18:44:09 +00:00
christos dacd5c569a PR/50009: David CARLIER: Enhance strptime to fill out more fields when it
can. From FreeBSD.
2015-07-03 13:06:54 +00:00
christos d72c59e26f don't define statics we don't need 2015-06-22 17:43:23 +00:00
christos fe1f008fec merge tzcode2015e:
Changes affecting code

    When displaying data, tzselect converts it to the current locale's
    encoding if the iconv command works.  (Problem reported by random832.)

    tzselect no longer mishandles Dominica, fixing a bug introduced
    in Release 2014f.  (Problem reported by Owen Leibman.)

    zic -l no longer fails when compiled with -DTZDEFAULT=\"/etc/localtime\".
    This fixes a bug introduced in Release 2014f.
    (Problem reported by Leonardo Chiquitto.)
2015-06-21 16:06:51 +00:00
christos 0c69da7c8a welcome to tzcode 2015d (zic performance improvements and cleanups) 2015-04-28 17:00:24 +00:00
ginsbach 08257a48e9 Add UTC as a synonym for GMT (%Z). [from FreeBSD] 2015-04-06 14:38:22 +00:00
pgoyette 03022ba794 Remove dangling cross-ref to localtime(3). There's another cross-ref in
the next sentence that actually makes sense.
2015-04-05 08:36:38 +00:00
ginsbach 236fefb93e Fix spelling; time zone is two words not one. 2015-04-03 15:52:50 +00:00
christos aa771cb970 merge 2015b 2015-03-24 20:01:18 +00:00
christos c51676e4e1 merge tzcode2015a:
tzalloc now scrubs time zone abbreviations compatibly with the way
that tzset always has, by replacing invalid bytes with '_' and by
shortening too-long abbreviations.
2015-01-31 18:55:17 +00:00
christos 6ced7fd882 welcome to 2014j 2014-11-18 01:58:59 +00:00
christos b95700c1f3 localtime did not set tm->tm_zone properly making pkgsrc emacs core-dump.
Thanks to Masanori Kanaoka.
2014-11-11 18:46:54 +00:00
christos 0a409b4552 remove stray endif 2014-10-23 21:19:53 +00:00
christos 67431d7357 merge 2014i 2014-10-23 18:45:58 +00:00
christos 5b3acd55fe - don't leak errno in mktime()
- when we load a new timezone, don't change anything unless the load succeeded.
2014-10-16 17:53:32 +00:00
christos 355ccc569e PR/49284: Andreas Gustafsson: sysinst segfaults when configuring network
manually. When tzload() fails called from zoneinit(), when trying to set the
local timezone for the first time in tzsetlcl(), we end up with a lclptr
that contains garbage, so settzname() core-dumps.

Thanks Andreas for the analysis!
2014-10-15 15:13:45 +00:00
christos 0230240a4a improve error checking (setting errno) 2014-10-14 20:35:40 +00:00
martin 6a83d78f0f Make yeartot() declaration match prototype. 2014-10-08 13:13:34 +00:00
msaitoh 293393def8 Fix typo. 2014-10-08 05:44:03 +00:00
christos c3777759a4 don't define functions we define in our own headers 2014-10-07 22:20:33 +00:00
christos 6eda9e7a82 Fix backslashes 2014-10-07 22:20:17 +00:00
christos d953dfb290 remove version stuff 2014-10-07 22:14:46 +00:00
christos 1f6103b179 Sync with tzcode2014h 2014-10-07 21:51:03 +00:00