Re: [CentOS] Timezone and date
On Wed, Apr 5, 2017 at 1:47 PM, Richardwrote: > > > Date: Wednesday, April 05, 2017 13:15:19 -0400 > > From: Brian Mathis > > > > On Tue, Apr 4, 2017 at 9:22 PM, Jerry Geis > > wrote: > > > >> When I do the date +%Z I get the timezone. Which currently is EDT. > >> > >> I am sending information to another system, that says EDT is not a > >> valid timezone. I have no way to modify the other system. > >> > >> My question is - is there a way to get the non-day-lite savings > >> time zone ? For example EST is valid - EDT is not. > >> > >> Just curious if there is an easy way already present to get a > >> standard time zone. > >> > >> Thanks, - I know weird situation the other end not supported EDT. > >> > >> Jerry > > > > Communication of time values should use UTC, not a specific time > > zone, unless the remote side needs to know the time zone for a > > specific reason. > > > > To get the time in a different zone, use the TZ environment var: > > TZ=UTC date > > > > ~ Brian Mathis > > @orev > > Or, if for some reason you want to pass the timezone, use the GMT > offset (e.g., -0400) rather than the three-letter abbreviations that, > as noted earlier, aren't unique. > > A better description of the context for this might also result in > more focused responses. > It may not be what you want if you need to know the actual time zone for some reason. Different places switch to Daylight Saving or Summer time on different schedules, and you might also need to know if that location was actually in DST at the time. Using just the offset does not convey that information. I agree that more context is needed. ~ Brian Mathis @orev ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Timezone and date
On Tue, April 4, 2017 21:22, Jerry Geis wrote: > When I do the date +%Z I get the timezone. Which currently is EDT. > > I am sending information to another system, that says EDT is not a > valid > timezone. I have no way to modify the other system. > > My question is - is there a way to get the non-day-lite savings time > zone ? > For example EST is valid - EDT is not. > date -u Wed Apr 5 20:18:45 UTC 2017 -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Do NOT open attachments nor follow links sent by e-Mail James B. Byrnemailto:byrn...@harte-lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Timezone and date
> Date: Wednesday, April 05, 2017 13:15:19 -0400 > From: Brian Mathis> > On Tue, Apr 4, 2017 at 9:22 PM, Jerry Geis > wrote: > >> When I do the date +%Z I get the timezone. Which currently is EDT. >> >> I am sending information to another system, that says EDT is not a >> valid timezone. I have no way to modify the other system. >> >> My question is - is there a way to get the non-day-lite savings >> time zone ? For example EST is valid - EDT is not. >> >> Just curious if there is an easy way already present to get a >> standard time zone. >> >> Thanks, - I know weird situation the other end not supported EDT. >> >> Jerry >> > > > Communication of time values should use UTC, not a specific time > zone, unless the remote side needs to know the time zone for a > specific reason. > > To get the time in a different zone, use the TZ environment var: > TZ=UTC date > > > ~ Brian Mathis > @orev Or, if for some reason you want to pass the timezone, use the GMT offset (e.g., -0400) rather than the three-letter abbreviations that, as noted earlier, aren't unique. A better description of the context for this might also result in more focused responses. ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Timezone and date
On Tue, Apr 4, 2017 at 9:22 PM, Jerry Geiswrote: > When I do the date +%Z I get the timezone. Which currently is EDT. > > I am sending information to another system, that says EDT is not a valid > timezone. I have no way to modify the other system. > > My question is - is there a way to get the non-day-lite savings time zone ? > For example EST is valid - EDT is not. > > Just curious if there is an easy way already present to get a standard time > zone. > > Thanks, - I know weird situation the other end not supported EDT. > > Jerry > Communication of time values should use UTC, not a specific time zone, unless the remote side needs to know the time zone for a specific reason. To get the time in a different zone, use the TZ environment var: TZ=UTC date ~ Brian Mathis @orev ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Timezone and date
On 04/04/2017 10:57 PM, ken wrote: On 04/04/2017 09:22 PM, Jerry Geis wrote: When I do the date +%Z I get the timezone. Which currently is EDT. I am sending information to another system, that says EDT is not a valid timezone. I have no way to modify the other system. My question is - is there a way to get the non-day-lite savings time zone ? For example EST is valid - EDT is not. Just curious if there is an easy way already present to get a standard time zone. Thanks, - I know weird situation the other end not supported EDT. Jerry ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos "man date" shows a few options: %z +hhmm numeric time zone (e.g., -0400) %:z+hh:mm numeric time zone (e.g., -04:00) %::z +hh:mm:ss numeric time zone (e.g., -04:00:00) %:::z numeric time zone with : to necessary precision (e.g., -04, +05:30) %Z alphabetic time zone abbreviation (e.g., EDT) That is, perhaps the "other system" wants some kind of numeric representation. Without knowing the recipient app on that other system, this is just a guess. EST5EDT "man timezone" might also be inspiring. ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Timezone and date
On 4/4/2017 7:51 PM, John R Pierce wrote: On 4/4/2017 6:22 PM, Jerry Geis wrote: When I do the date +%Z I get the timezone. Which currently is EDT. I am sending information to another system, that says EDT is not a valid timezone. I have no way to modify the other system. My question is - is there a way to get the non-day-lite savings time zone ? For example EST is valid - EDT is not. Just curious if there is an easy way already present to get a standard time zone. Thanks, - I know weird situation the other end not supported EDT. # cat /etc/timezone America/Los_Angeles oops, sent too soon. thats the canonical time zone. things like CST, they aren't globally reliable, in China, CST is China Standard Time, while in the USA its Central Standard Time. OOOPS. there's a bunch more such conflicts in 3-letter timezones around the world, they had best be avoided. -- john r pierce, recycling bits in santa cruz ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Timezone and date
On 04/04/2017 09:22 PM, Jerry Geis wrote: When I do the date +%Z I get the timezone. Which currently is EDT. I am sending information to another system, that says EDT is not a valid timezone. I have no way to modify the other system. My question is - is there a way to get the non-day-lite savings time zone ? For example EST is valid - EDT is not. Just curious if there is an easy way already present to get a standard time zone. Thanks, - I know weird situation the other end not supported EDT. Jerry ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos "man date" shows a few options: %z +hhmm numeric time zone (e.g., -0400) %:z+hh:mm numeric time zone (e.g., -04:00) %::z +hh:mm:ss numeric time zone (e.g., -04:00:00) %:::z numeric time zone with : to necessary precision (e.g., -04, +05:30) %Z alphabetic time zone abbreviation (e.g., EDT) That is, perhaps the "other system" wants some kind of numeric representation. Without knowing the recipient app on that other system, this is just a guess. ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Timezone and date
On 4/4/2017 6:22 PM, Jerry Geis wrote: When I do the date +%Z I get the timezone. Which currently is EDT. I am sending information to another system, that says EDT is not a valid timezone. I have no way to modify the other system. My question is - is there a way to get the non-day-lite savings time zone ? For example EST is valid - EDT is not. Just curious if there is an easy way already present to get a standard time zone. Thanks, - I know weird situation the other end not supported EDT. # cat /etc/timezone America/Los_Angeles -- john r pierce, recycling bits in santa cruz ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Timezone and date
> On Apr 4, 2017, at 9:22 PM, Jerry Geiswrote: > > sending information to another system What does this mean? Syslog? ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
[CentOS] Timezone and date
When I do the date +%Z I get the timezone. Which currently is EDT. I am sending information to another system, that says EDT is not a valid timezone. I have no way to modify the other system. My question is - is there a way to get the non-day-lite savings time zone ? For example EST is valid - EDT is not. Just curious if there is an easy way already present to get a standard time zone. Thanks, - I know weird situation the other end not supported EDT. Jerry ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos