Date::Manip::TZ(3)

✨ NAME ✨

Date::Manip::TZ β€” an interface to the time zone data πŸ’–

ok so this is the Date::Manip::TZ(3) page from the User Contributed Perl Documentation, bestie, and it's literally your backstage pass to every time zone on earth 🌍✨


🌸 SYNOPSIS 🌸

use Date::Manip::TZ;
$tz = new Date::Manip::TZ;

Data for most (and hopefully all) time zones used around the world have been gathered and is publicly available in the zoneinfo (or Olson) database. 🌈

This module uses the data from the zoneinfo database to perform various time zone operations. no cap.


πŸ¦‹ DESCRIPTION πŸ¦‹

Every time zone has some of the following characteristics, bestie, and here's the tea on each one:

πŸŽ€ name

Every time zone has a unique name. In the zoneinfo database, these are something similar to:

America/New_York

πŸŽ€ aliases

Time zones may have (but are not required to have) one or more aliases. Each alias is unique, and is not the same as any time zone name. An alias can be used in exactly the same way as a name. πŸ’…

πŸŽ€ periods

Every time zone is broken up into periods. Each period describes how a portion of time relates to GMT, and how it might be expressed. ⏰

Each period includes the following information:

🌟 start time, end time

The period begin and ends at certain times. The times are included both as an absolute GMT time, and as a wall clock time. The wall clock start time is the time that will be on a clock just as the period starts (i.e. after a time change). The wall clock end time is the time on a clock immediately before the period ends. πŸ•°οΈ

🌟 offset

The entire period has an offset which is how much the wall clock time differs from GMT.

🌟 abbreviation

When expressing the time period, an abbreviation (such as EST) is typically used.

🌟 daylight saving time flag

Every period is categorized as a standard time or a daylight saving time. The flag will be 1 if it is a daylight saving time, or 0 if it is a standard time. β˜€οΈπŸŒ™


Date::Manip includes all of the data for all of the time zones from the zoneinfo database. This data is available from:

<ftp://ftp.iana.org/tz/>

Additional data from other standards are also used. πŸ‘‘

The zoneinfo database is not necessary in order to use Date::Manip. Instead, all of that data has been extracted and stored in a series of other modules which are used to handle each time zone. In that way, Date::Manip has no dependency on any other source of data. periodt. 🫢

The Date::Manip::Zones document contains detailed information on the data available.


πŸ‘‘ METHODS πŸ‘‘

In all methods, the following variables are used, so lemme introduce you to the whole squad:

πŸ’œ $zone

This is a string which contains a valid time zone name. For example:

America/New_York

πŸ’œ $alias

This is a strings which contains a valid time zone name, or a valid time zone alias. For example:

America/New_York
US/Eastern
EST5EDT

πŸ’œ $abbrev

This is a string which contains a valid time zone abbreviation. For example:

EST

πŸ’œ $offset

This is a time zone entered as an offset. An offset is either a string of one of the formats:

+HH
+HHMM
+HHMMSS
+HH:MM
+HH:MM:SS

or it can be a list reference:

[HH,MM,SS]

If a list reference is used, the sign must be included with all values. So, the offset "-05:30" would be the list reference:

[-5,-30,0]

πŸ’œ $dstflag

This is always one of the values: std, stdonly, dst, dstonly

It defaults to "std" if it is not present. When determining a time zone, it is usually necessary to check a number of different time zone and DST combinations.

If $dstflag is "std", it will check both standard and daylight saving times, but will give preference to standard times. If $dstflag is "stdonly", only standard times will be checked.

The "dst" flag will search both, but give preference to daylight saving times. The "dstonly" values will only use daylight saving times. 🌞

πŸ’œ $date

A date is always a string containing a date in one of the formats:

 YYYYMMDDHH:MN:SS
 YYYY-MM-DD-HH:MN:SS
 YYYYMMDDHHMNSS

or a list reference:

 [Y,M,D,H,MN,S]

πŸ’œ $isdst

This is 0 if a date is in standard time, 1 if it is in daylight saving time.

πŸ’œ $period

A period is a list reference currently containing the following items:

[ $dateUT, $dateLT, $offsetstr, $offset, $abbrev, $isdst,
  $endUT, $endLT, $begUTs, $begLTs, $endUTs, $endLTs ]

$dateUT and $dateLT are the starting date of the period (i.e. the first second in a period) in universal (GMT) time and local (wall clock) time. $endUT and $endLT are the end date of the period (i.e. the last second in a period) in universal and local time. These are all stored as list references.

$offsetstr is the string representation of the offset ("+05:00:00") and $offset is the corresponding list reference form ([5,0,0]).

$abbrev is the abbreviation that applies during this period, and $isdst is 0 or 1 if it is standard or daylight saving time.

⚠️ When accessing the elements in a period, use ONLY positive indices. In other words, to get $endUT, access it as $$period[6], NOT as $$period[-2], since I am considering adding more information to the period description that may speed up performance.

$begUTs is the string representation (YYYYMMDDHH:MN:SS) of $begUT. Similar for $begLTs, $endUTs, and $endLTs.


The following methods are available, bestie β€” let's go through every single one:

🩷 base

🩷 config

🩷 err

🩷 new

🩷 new_config

Please refer to the Date::Manip::Obj documentation for these methods. πŸ“š

🩷 all_periods

@periods = $tz->all_periods($zone,$year);

This returns the description of all time zone periods that occur (in full or in part) during the given year. The year is measured in universal (GMT) time. 🌍

🩷 convert

🩷 convert_to_gmt

🩷 convert_from_gmt

🩷 convert_to_local

🩷 convert_from_local

These functions convert a date from one time zone to another. it's giving timezone glow-up ✨

($err,$date,$offset,$isdst,$abbrev) =
   $tz->convert($date,$from,$to [,$isdst]);

This converts a date in the time zone given by $from to the time zone given by $to.

($err,$date,$offset,$isdst,$abbrev) =
   $tz->convert_to_gmt($date [,$from] [,$isdst]);

This converts a date to GMT. If $from is given, it is the current time zone of the date. If $from is omitted, it defaults to the local time zone.

The value of $isdst returned is always 0.

($err,$date,$offset,$isdst,$abbrev) =
   $tz->convert_from_gmt($date [,$to]);

This converts a date from GMT to another time zone. If $to is given, the date is converted to that time zone. Otherwise, it is converted to the local time zone.

($err,$date,$offset,$isdst,$abbrev) =
   $tz->convert_to_local($date [,$from] [,$isdst]);
($err,$date,$offset,$isdst,$abbrev) =
   $tz->convert_from_local($date [,$to] [,$isdst]);

Similar to the convert_to_gmt and convert_from_gmt functions. If $from or $to are omitted, they default to GMT.

If there is any ambiguity about whether $date is in DST or not (i.e. if it is a date that is repeated during a time change due to the clock being moved back), the $isdst option can be passed in as an argument (it should be 0 or 1) to say which time to use. It is ignored in all cases where $date can be determined without that information. πŸ€”

The $isdst value passed back is 1 if the converted date is in DST. The $offset value passed back is a list reference containing the offset from GMT. $abbrev passed back is the time zone abbreviation.

Error codes are:

0  No error
1  Invalid arguments
2  Invalid FROM zone
3  Invalid TO zone
4  Invalid date

🩷 curr_zone

$tz->curr_zone();

This returns the system time zone. The system time zone is determined using the methods described below in the "DETERMINING THE SYSTEM TIME ZONE" section. πŸ”

This is the time zone that is used by default unless the SetDate or ForceDate config variable is set to a different zone.

$tz->curr_zone(1);

This clears the system time zone and re-determines it using the methods described below.

The main reason to do this is if the curr_zone_methods method is used to change how the time zone is determined.

🩷 curr_zone_methods

$tz->curr_zone_methods(@methods);

This sets the list and order of methods to use in determining the local time zone. The various methods available are listed below in the section "DETERMINING THE SYSTEM TIME ZONE".

Some methods may require one or more arguments. For example, the method named "mainvar" takes an option that is the name of a variable. The arguments must be included in the @methods list immediately after the method name (so @methods is actually a mixture of method names and arguments).

🚨 This method may not be used in any environment where taint checking is enabled. If it is, it will issue a warning, but will NOT change the method list. scary but true πŸ’€

🩷 date_period

$period = $tz->date_period($date,$zone,$wall_clock [,$isdst]);

This returns the period information for the given date. $date defaults to GMT, but may be given as local (i.e. wall clock) time if $wall_clock is non-zero. The period information is described in the periods method below.

If a wall clock time is given, no period is returned if the wall clock time doesn't ever appear (such as when a time change results in the clock moving forward "skipping" a period of time). If the wall clock time appears twice (i.e. when a time change results in the clock being set back), the $isdst variable is used. The standard time is used unless $isdst is non-zero. $isdst is ignored except in the case where there are two possible periods. ⏳

🩷 define_abbrev

($err,$val) = $tz->define_abbrev($abbrev,@zone);

When encountering an abbreviation, by default, all time zones which ever include the abbreviation will be examine in the order given in the Date::Manip::Zones manual.


ok so sometimes the order the zones get checked in is just… wrong for you πŸ™ˆ This happens when you're parsing dates in a time zone that uses an abbreviation which also gets used somewhere else, and that other zone is the one getting picked first. Classic example, bestie: the abbreviation "ADT" defaults to the "Atlantic/Bermuda" time zone. But if you're actually in "America/Halifax" (which also uses that abbreviation), you're gonna wanna flip the order. πŸ’…

So here's the vibe: you hand it an abbreviation β€” and it has to be a known abbreviation, there's genuinely no way to invent a brand new one, sorry β€” plus a list of zones. What that does is set the list of zones that get checked, and the order they get checked in, whenever a date shows up with that abbreviation. The list doesn't have to include every zone that has ever used the abbreviation, but it is not allowed to include a zone that has never used it. ✨

If $abbrev is "reset", every abbreviation gets reset back to the standard values. And if @zone contains only the element 'reset', then the default list for $abbrev gets restored. 🫢

These are the error codes it hands back:

0  No error
1  $abbrev is not a valid abbreviation in any time zone
2  A zone (returned as $val) is not a valid time zone
3  A zone (returned as $val) does not use the abbreviation

Wanna know about all the different zones that might correspond to each abbreviation, and the order they get examined in by default? Go read the Date::Manip::Zones manual. πŸ‘‘

define_alias

$err = $tz->define_alias($alias,$zone);

This one makes a new alias, or overrides one that already exists. $zone has to be a valid zone, otherwise you get an error back, no cap. 😀

For the tea on which aliases get set by default, hit up the Date::Manip::Zones manual.

If $alias is "reset", all aliases get reset to the standard values. If $zone is "reset", then $alias gets reset to its standard value. πŸŽ€

define_offset

($err,$val) = $tz->define_offset($offset, [$dstflag,] @zone);

This is basically define_abbrev's sibling. When an offset shows up, every time zone that has ever included that offset gets checked. This method defines which time zones those are, and what order they get checked in. πŸ¦‹

The zones map to both standard and daylight saving times that include the offset β€” that's when $dstflag is "std" or "dst" β€” or to just one or the other.

If $offset is "reset", all the lists get reset to default values. If @zone contains only the element 'reset', the default list and order gets restored for $offset (and heads up, $dstflag must not be given in that case). πŸ™…

Error codes you might catch:

0  No error
1  $offset is not a valid offset in any time zone
2  $offset is not a valid offset in the selected
   time (if doing "dstonly" or "stdonly")
3  A zone (returned as $val) is not a valid time zone
4  A zone (returned as $val) does not use the offset
5  A zone (returned as $val) does not include the
   offset in the selected time (if doing "dstonly"
   or "stdonly")

9  Offset is not a valid offset

periods

@periods = $tz->periods($zone,$year);

This gives you the description of every time zone period that begins during the year you passed in. Important: the year is measured in universal (GMT) time. 🌍

If no time zone period starts in that year, you get nothing back. Nada. πŸ’€

@periods = $tz->periods($zone,undef,$year);

This one returns every period that begins in any year from 0001 all the way to $year.

@periods = $tz->periods($zone,$year0,$year1);

And this one returns every period that begins in any year from $year0 to $year1. ✨

tzdata

tzcode

$vers = $tz->tzdata();
$vers = $tz->tzcode();

These two just hand you the versions of the tzdata and tzcode packages that were used to generate the modules. Short and sweet. πŸ’–

zone

$zone = $tz->zone(@args);
@zone = $tz->zone(@args);

This function returns a list of every zone β€” or just the default zone β€” that matches all the info you fed it. In scalar context you get only the default zone. In list context you get all of them. πŸ”₯

@args can include any of these, and honestly the order does not matter:

  • A zone name or alias ($alias)
  • A zone abbreviation ($abbrev)
  • An offset ($offset)
  • A dstflag ($dstflag)
  • A date ($date)

It is NOT valid to include two of any of those items. Any time zone that comes back will match all of the data you supplied. ⭐

If an error happens, undef comes back. If no zone matches, you get an empty string, or an empty list. 😭

The order of the zones gets determined like this:

If $abbrev is given, the order of time zones is determined by it (and $dstflag). If $dstflag is "std", all zones matching $abbrev in standard time get included first, followed by all that match $abbrev in saving time (but no duplication is allowed, periodt). Reverse that if $dstflag is "dst". πŸ’…

If $abbrev isn't given but $offset is, then $offset (and $dstflag) determines the order. If $dstflag is "std", all zones matching $offset in standard time come first, followed by all that match $offset in saving time (again, no duplication allowed). Reverse it if $dstflag is "dst". πŸ¦‹

If $date is given, you only get zones in which $date will appear in a zone that matches all the other info. And $date is a wall clock time. πŸ•°οΈ

If no $zone, $abbrev, or $offset is entered, the local time zone may get returned (unless $date is entered and it doesn't exist in the local time zone). πŸ™ˆ

NOTE: there's one important thing to note with respect to $dstflag when you're working with a timezone expressed as an offset and a date is passed in. In this case, the default value of $dstflag is "dst" (NOT "stdonly"), and you probably never want to pass in a value of "std" (though passing in "stdonly" is fine).

For standard offsets (with no minute component), there's always a standard timezone that matches that offset. Like, the timezone "+0100" matches the timezone "Etc/GMT+01", so you will never get a timezone in daylight saving time if $dstflag is "std". 🀯

So if you wanna pass in a date of 2001-07-01-00:00:00 and a timezone of "+0100", and you want a timezone that refers to that date as a daylight saving time date, you must use the $dstflag of "dst" (or "dstonly"). πŸŽ€

And because that's almost always the behavior people actually want, when a zone is passed in as an offset and a date is passed in, the default $dstflag is "dst" instead of "std". In every other situation, the default is still "std". 🌈

If the timezone is expressed as an abbreviation, this whole problem doesn't happen. ✨


πŸ’– TIME ZONE INFORMATION IN DATE::MANIP πŸ’–

ok so this is the part where things get a lil spicy 🌢️ Date::Manip works with three potentially different time zones whenever it's dealing with a date. Three. πŸ‘‘

The first time zone is the actual local time zone. That's the time zone the computer is literally running in right now. πŸ’»

The second time zone is the working time zone. Usually you want the default time zone to be the local time zone, but sometimes you might want the default to be something different. πŸ™ˆ

The third time zone is the actual time zone that was parsed, or set, for a date. If a date has no time zone info in it at all, it defaults to the working time zone. πŸ•°οΈ

The local time zone gets determined using the methods described in the next section. There are methods for locating the zone in one of the system configuration files, for determining it by running a system command, or for looking it up in the registry (that's the Windows operating systems situation πŸͺŸ). And if all of those methods fail, the local time zone may be set using either the $::TZ or $ENV{TZ} variables. Please note, bestie: those should ONLY be used to set the actual local time zone. 🚨

If you're running in one time zone but you want to force dates to be specified in an alternate time zone by default, you need to set the working time zone. The working time zone defaults to the local time zone, but you can change that using either the SetDate or ForceDate config variables. Go read the Date::Manip::Config manual for more on that. πŸ“–

And finally β€” when a date is actually parsed, if it contains any time zone information, the date gets stored in that time zone. Periodt. πŸ’…

DETERMINING THE SYSTEM TIME ZONE 🌍✨

okay bestie, so there are literally SO many ways to figure out your time zone, and some or all of them can be checked. πŸ’– There's a default list of methods that gets used, and you can override it with the curr_zone_methods function that we already talked about above (iykyk). To override the default order and/or list of methods, just pass in a list of method names (with arguments where necessary), and only those methods will be done, and in the order given. periodt. πŸ’…

The following methods are available, and they're all iconic in their own way:

  • main VAR β€” The main variable named VAR is checked. E.g. "main TZ" checks the variable $::TZ . main character variable energy, fr fr.
  • env TYPE VAR β€” The named environment variable is checked and the type of data stored there is checked. (TYPE can be 'zone' or 'offset' which is the number of seconds from UTC). vibe check on the env var, no cap.
  • file FILE β€” Look in the given file for any one of the following case insensitive lines:
    • ZONE
    • tz = ZONE
    • zone = ZONE
    • timezone = ZONE ZONE may be quoted (single or double) and whitespace is ignored (except that underscores in the zone name may be replaced by whitespace on some OSes). If the entire line is a zone, it must be the first non-blank non-comment line in the file. it's giving detective energy, honestly.
  • command COMMAND β€” Runs a command which produces a time zone as the output. command go brrr.
  • cmdfield COMMAND N β€” Runs a command which produces whitespace separated fields, the Nth one containing the time zone (fields are numbered starting at 0, or from the end starting at -1). field trip, but make it timezone.
  • gmtoff β€” Uses the current offset from GMT to come up with a best guess. bestie guess, lowkey.
  • tzdata FILE DIR β€” This uses a system config file that contains a pointer to the local tzdata files to determine the timezone. On many operating systems, use:
tzdata /etc/localtime /usr/share/zoneinfo

FILE is the system file. DIR is the directory where the tzdata files are stored.

The config file is either a link to a file in the tzdata directory or a copy of one of the files. this one is a whole journey, bestie.

  • registry β€” Look up the value in the Windows registry. This is only available to hosts running a Windows operating system. Windows only, sorry to the Linux girlies.
Note that the "main" and "env" methods should only be used to specify the actual time zone the system is running in. Use the SetDate and ForceDate config variables to specify an alternate time zone that you want to work in. 🫢

By default, the following methods are checked (in the order given) on Unix systems:

main     TZ
env      zone TZ
file     /etc/TIMEZONE
file     /etc/timezone
file     /etc/sysconfig/clock
file     /etc/default/init
command  "/bin/date +%Z"
command  "/usr/bin/date +%Z"
command  "/usr/local/bin/date +%Z"
cmdfield /bin/date             -2
cmdfield /usr/bin/date         -2
cmdfield /usr/local/bin/date   -2
command  "/bin/date +%z"
command  "/usr/bin/date +%z"
command  "/usr/local/bin/date +%z"
tzdata   /etc/localtime /usr/share/zoneinfo
gmtoff

The default methods for Windows systems are:

main     TZ
env      zone TZ
registry
gmtoff

The default methods for VMS systems are:

main     TZ
env      zone TZ
env      zone SYS$TIMEZONE_NAME
env      zone UCX$TZ
env      zone TCPIP$TZ
env      zone MULTINET_TIMEZONE
env      offset SYS$TIMEZONE_DIFFERENTIAL
gmtoff

The default methods for all other systems are:

main     TZ
env      zone TZ
gmtoff

If anyone wants better support for a specific OS, please contact me and we'll coordinate adding it. fr fr, just reach out. 🫢

In all cases, the value returned from the method may be any of the following:

  • the full name of a time zone (e.g. America/New_York) or an alias
  • an abbreviation (e.g. EDT) which will be used to determine the zone if possible
  • an offset (+hh, +hhmn, +hh:mm, +hh:mm:ss) from GMT

The Date::Manip::Zones module contains information about the time zones and aliases available, and what time zones contain the abbreviations. that's where the lore lives, iykyk. πŸ“š


DESIGN ISSUES πŸ§ πŸ’…

The design decisions made in writing this module may cause some questions (and probably complaints). 😭 not me defending my choices, but here we are. The time zone modules are all generated using scripts (included in the Date::Manip distribution) which use the standard tzdata tools to parse the tzdata files and store that information in perl modules.

I'd like to address some of them, to avoid answering some of the "why did you do it that way" remarks. I do welcome discussion about these decisions... but preferably after you understand why those decisions were made so that we have an informed basis to begin a discussion. let's get into it, bestie. πŸ’–

Why not use existing zoneinfo files

Some people will probably think that I should have written an interface to the zoneinfo files which are distributed with most operating systems. Although I considered doing that, I rejected the idea for two reasons.

First, not all operating systems come with the zoneinfo databases in a user accessible state (Microsoft for example). Even those that do include them store the information in various formats and locations. In order to bypass all that, I have included the data directly in these modules. we're doing it ourselves, periodt.

Second, as I was doing my initial investigations into this, I ran into a bug in the Solaris zoneinfo tools (long since fixed I'm sure). I decided then that I didn't want to depend on an implementation where I could not control and fix the bugs. trauma, honestly. 😭

Why not use the native tzdata files

Another decision people may question is that I parse the tzdata files and store the data from them in a large number of perl modules instead of creating an interface to the tzdata files directly. This was done solely for the sake of speed. Date::Manip is already a slow module. I didn't want to slow it down further by doing the complex parsing required to interpret the tzdata files while manipulating dates. By storing the data in these modules, there is little or no parsing done while using Date::Manip modules. It costs a little disk space to store this information... but very little of it is actually loaded at runtime (time zone data is only loaded when the time zone is actually referred to), so I feel it's a good tradeoff. speed is the vibe, and we're obsessed. ✨

Why store the information in so many files

The data from the native tzdata files are parsed and stored in two sets of modules. These include almost 500 Date::Manip::Offset::* modules and almost 450 Date::Manip::TZ::* modules. almost 500 and almost 450? iconic numbers, no cap.

I note that on my linux box, /usr/share/zoneinfo (which contains data files generated from the tzdata files) contains over 1700 files, so I'm not doing anything "new" by breaking up the information into separate files. And doing so has a huge impact on performance... it is not necessary to load and/or manipulate data from time zones which are not in use.

The minute I made the decision to distribute the timezone information myself, as opposed to using the system version, it was a given that there would be a lot of files.

These modules are loaded only when the time zone or offset is actually used, so, unless dates from around the world are being parsed, only a very small number of these modules will actually be loaded. In many applications, only a single TZ module will be loaded. If parsing dates which have timezone information stored as offsets, one or two Offset modules will also be loaded. lazy loading but make it timezone data, we love to see it. πŸ¦‹

The disk space seems excessive

Currently, the disk usage of the perl files is around 9 MB. Total disk usage for /usr/share/zoneinfo on my computer is around 4 MB. There are a couple of differences.

The primary difference is that the zoneinfo files are stored in a binary (and hence, more compressed) version, where the perl modules have all the data in pure text.

Since these are all automatically generated and used, it may be beneficial to store the data in some packed binary format instead of the fully expanded text form that is currently in use. This would decrease the disk space usage, and might improve performance. However, the performance improvement would happen only once per timezone, and would make for more complicated code, so I'm not very interested in pursuing this. not me avoiding extra work, but honestly, same.

Another aspect of the current modules is that they all include pod documentation. Although not necessary, this allows users to easily see what modules handle which time zones, and that's nice. It also allows me to use pod_coverage tests for the module which is a nice check to make sure that the documentation is accurate. documentation? we love her. πŸ“š

All told, I don't consider the disk usage excessive at all. and that's the tea. β˜•

πŸ’€ KNOWN PROBLEMS OR ISSUES πŸ’€

ok so like, the tea on things that can go sideways. not me being honest about my own flaws, we love a self-aware icon πŸ’…

😭 Unable to determine Time Zone

bestie. listen. when you use Date::Manip, at the moment the module gets initialized, it has to be able to figure out your local time zone. and if it can't? it throws an error that looks exactly like this:

Unable to determine Time Zone

and then the script just... exits. gone. no more script. πŸ’€

back in the day, this was THE most common problem with using Date::Manip, fr fr. but since 6.00 dropped, this should be way less of a thing. if you do still get this error, go back up and read the section above, DETERMINING THE SYSTEM TIME ZONE, it's got all the info about how to figure out your local time zone. and also? the author would genuinely love to hear about it, so that the default list of methods can get updated and the local time zone detection can be better. so yeah, tell them 🫢

πŸ•Ž Asia/Jerusalem time zone

okay so the Asia/Jerusalem time zone is lowkey built different. it has a non-standard way of specifying the start and end of Daylight Saving Time, based on the Hebrew calendar. iconic of it honestly, but also a problem.

because of that, there's literally no way to write one simple rule that defines the time zone changes for all years in the future. so as a result, this module supports all the time zone changes currently specified in the zoneinfo database β€” which, as of right now, goes up to the year 2037 β€” but it does not attempt to correctly handle zone changes past that date. at all.

so like, Date::Manip should not be used to parse dates in the Jerusalem time zone that are far enough in the future that the info isn't in the current version of the zoneinfo database. periodt. don't do it. 🚫

🌫️ LMT and zzz abbreviations

both LMT and zzz abbreviations show up in the zoneinfo databases. here's the breakdown:

  • LMT is used for most time zones for the times before the Gregorian calendar was adopted.
  • zzz is used for a few time zones where the time zone was created and no description of dates prior to that is supported.

and both LMT and zzz are basically ignored when parsing dates, because there's genuinely no reasonable way to figure out which zone they're referring to. so they'll just be treated as the local time zone regardless. yeah. that's the vibe πŸ™ˆ


πŸ› KNOWN BUGS πŸ›

None known.

(we love a clean slate, no cap ✨)


πŸ“¬ BUGS AND QUESTIONS πŸ“¬

got a bug? got a question? please refer to the Date::Manip::Problems documentation for all the info on submitting bug reports or questions to the author. they wanna hear from you 🫢


πŸ‘€ SEE ALSO πŸ‘€

  • Date::Manip β€” main module documentation

πŸ“œ LICENSE πŸ“œ

This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Sullivan Beck (https://github.com/SBECK-github/)


okay that's a wrap on the whole page bestie, we made it to the end together 🌈✨ this was perl v5.42.3, dated 2026-09-01, and the page is Date::Manip::TZ(3). go forth and parse responsibly πŸ’…πŸŽ€

πŸ“¦ where this page comes from