CST timezone that does not account for DST
Hello Team, How can we have CST timezone that does not account for DST ? Using the POSIX string, we can create a timezone called CST that is GMT+6 as follows: [root@hp-dl120gen9-01 ~]# TZ=:CST6 date Thu Jul 9 06:50:29 CST 2015 But this is not consitent if tzdata package is update. Also this does take into account DST change? Thanks, Nilesh P.
Nilesh Parmar wrote:
Using the POSIX string, we can create a timezone called CST that is GMT+6 as follows:
[root@hp-dl120gen9-01 ~]# TZ=:CST6 date Thu Jul 9 06:50:29 CST 2015
TZ=':CST6' uses an implementation-specific extension to POSIX. Often in this case implementations ignore the ':' so it's equivalent to TZ='CST6'. tzcode does that, and I assume glibc does too. With TZ='CST6', the time zone is six hours behind UTC (i.e., west of Greenwich), like this: $ date -u; TZ=CST6 date Wed Jul 29 22:52:44 UTC 2015 Wed Jul 29 16:52:44 CST 2015
But this is not consitent if tzdata package is update.
A TZ setting like 'CST6' is a string specified by POSIX, and should work correctly regardless of what's in tzdata.
Also this does take into account DST change?
TZ='CST6' has no DST. For more about POSIX TZ settings, please see: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_...
On Wed, Jul 29, 2015, at 17:56, Nilesh Parmar wrote:
Hello Team,
How can we have CST timezone that does not account for DST ?
Using the POSIX string, we can create a timezone called CST that is GMT+6 as follows:
That's GMT-6. GMT+6 is the time in e.g. Kazakhstan, and is not AFAIK called CST anywhere it is used.
[root@hp-dl120gen9-01 ~]# TZ=:CST6 date Thu Jul 9 06:50:29 CST 2015
You shouldn't use the : if you are using a POSIX string. Just TZ=CST6 should work on any POSIX system.
But this is not consitent if tzdata package is update.
Why not?
Also this does take into account DST change?
It shouldn't. Anyway, if this is for Saskatchewan what's wrong with America/Regina? What do you need this for?
On 2015-07-30 09:24, random832@fastmail.us wrote:
On Wed, Jul 29, 2015, at 17:56, Nilesh Parmar wrote:
How can we have CST timezone that does not account for DST ? Using the POSIX string, we can create a timezone called CST that is GMT+6 as follows: That's GMT-6. GMT+6 is the time in e.g. Kazakhstan, and is not AFAIK called CST anywhere it is used. [root@hp-dl120gen9-01 ~]# TZ=:CST6 date Thu Jul 9 06:50:29 CST 2015 You shouldn't use the : if you are using a POSIX string. Just TZ=CST6 should work on any POSIX system. But this is not consitent if tzdata package is update. Why not? Also this does take into account DST change? It shouldn't. Anyway, if this is for Saskatchewan what's wrong with America/Regina? What do you need this for?
In Canada, areas that do not change their GMT offset do change their time legally at the same time as the rest of North America, from CST to MDT or MST to PDT, etc. i.e. they observe the daylight saving time of the zone to the west. ;^> -- Take care. Thanks, Brian Inglis
On Jul 30, 2015, at 2:21 PM, Brian Inglis <Brian.Inglis@systematicsw.ab.ca> wrote:
On 2015-07-30 09:24, random832@fastmail.us wrote:
On Wed, Jul 29, 2015, at 17:56, Nilesh Parmar wrote:
How can we have CST timezone that does not account for DST ? Using the POSIX string, we can create a timezone called CST that is GMT+6 as follows: That's GMT-6. GMT+6 is the time in e.g. Kazakhstan, and is not AFAIK called CST anywhere it is used. [root@hp-dl120gen9-01 ~]# TZ=:CST6 date Thu Jul 9 06:50:29 CST 2015 You shouldn't use the : if you are using a POSIX string. Just TZ=CST6 should work on any POSIX system. But this is not consitent if tzdata package is update. Why not? Also this does take into account DST change? It shouldn't. Anyway, if this is for Saskatchewan what's wrong with America/Regina? What do you need this for?
In Canada, areas that do not change their GMT offset do change their time legally at the same time as the rest of North America, from CST to MDT or MST to PDT, etc. i.e. they observe the daylight saving time of the zone to the west. ;^>
You can certainly use GMT-x as a workaround for that. But such timezones are covered by specific rules. If one is missing, or incorrect, that should be reported and fixed. paul
On Thu, Jul 30, 2015, at 14:21, Brian Inglis wrote:
In Canada, areas that do not change their GMT offset do change their time legally at the same time as the rest of North America, from CST to MDT or MST to PDT, etc. i.e. they observe the daylight saving time of the zone to the west. ;^>
Do you have a citation for this? It certainly doesn't seem to actually be true of the current implementation in tzdata. I live in Indiana and people (before DST was adopted) would often _talk_ about being on central time or "chicago time" for half the year, but it wasn't actually true in any official sense.
On Thu, Jul 30, 2015, at 14:21, Brian Inglis wrote:
In Canada, areas that do not change their GMT offset do change their time legally at the same time as the rest of North America, from CST to MDT or MST to PDT, etc. i.e. they observe the daylight saving time of the zone to the west. ;^>
Do you have a citation for this? It certainly doesn't seem to actually be true of the current implementation in tzdata.
I live in Indiana and people (before DST was adopted) would often _talk_ about being on central time or "chicago time" for half the year, but it wasn't actually true in any official sense.
Brian, Canadians living in one the areas where the clocks do not change often "believe" that they are switching time zones twice a year. I think I have posted comments about this in the past. However, the legislation (where it exists) says nothing about changing time zones in these areas. e.g. #1 from the Saskatchewan Time Act: "Time in eastern Saskatchewan and northeastern Saskatchewan: 6. Central standard time shall be used and observed throughout the year in eastern Saskatchewan and in northeastern Saskatchewan." e.g. #2 from the Quebec Time Act: "In the part of Québec east of the meridian of 63 degrees west longitude, the legal time is Atlantic Standard Time, which is four hours behind Coordinated Universal Time (UTC - 4 h)." Just to add confusion, the Saskatchewan Time Act also says this: 8(2)(a) in the Battle River Time Option Area: (i) during the summer period, is central standard time; and (ii) during the winter period, is mountain standard time; and Yes; in this case the Time Act does refer to a change of time zones, however this for an area that does change its clocks twice a year! -chris
On 2015-07-30 15:11, Chris Walton wrote:
On Thu, Jul 30, 2015, at 14:21, Brian Inglis wrote:
In Canada, areas that do not change their GMT offset do change their time legally at the same time as the rest of North America, from CST to MDT or MST to PDT, etc. i.e. they observe the daylight saving time of the zone to the west. ;^>
Do you have a citation for this? It certainly doesn't seem to actually be true of the current implementation in tzdata.
I live in Indiana and people (before DST was adopted) would often _talk_ about being on central time or "chicago time" for half the year, but it wasn't actually true in any official sense.
Brian, Canadians living in one the areas where the clocks do not change often "believe" that they are switching time zones twice a year. I think I have posted comments about this in the past. However, the legislation (where it exists) says nothing about changing time zones in these areas. e.g. #1 from the Saskatchewan Time Act: "Time in eastern Saskatchewan and northeastern Saskatchewan: 6. Central standard time shall be used and observed throughout the year in eastern Saskatchewan and in northeastern Saskatchewan." e.g. #2 from the Quebec Time Act: "In the part of Québec east of the meridian of 63 degrees west longitude, the legal time is Atlantic Standard Time, which is four hours behind Coordinated Universal Time (UTC - 4 h)."
Just to add confusion, the Saskatchewan Time Act also says this: 8(2)(a) in the Battle River Time Option Area: (i) during the summer period, is central standard time; and (ii) during the winter period, is mountain standard time; and Yes; in this case the Time Act does refer to a change of time zones, however this for an area that does change its clocks twice a year!
I recalled some apparently legal expression, perhaps before 2007, which was succinctly phrased, preserving a distinction between standard and daylight time, while resulting in no change, perhaps for BC Peace River, SK, NU Southampton Island, or QC Minganie E/Golfe du St Laurent. OTOH, as you say, it may not have been actual legislative wording I recalled. -- Take care. Thanks, Brian Inglis
participants (6)
-
Brian Inglis -
Chris Walton -
Nilesh Parmar -
Paul Eggert -
Paul_Koning@dell.com -
random832@fastmail.us