[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: displaying Date using local timezone
From: |
Paul Fox |
Subject: |
Re: displaying Date using local timezone |
Date: |
Tue, 16 Mar 2021 17:58:25 -0400 |
ken wrote:
> >I took a look at trying to suppress the extra output if the timezone is
> >already
> >the same as my local zone, but as far as I can tell, it's not possible.
> >There's
> >no way to get access to the original timezone and the local timezone at the
> >same time, since once you run date2local, the original is gone.
> >
> >Am I right about this?
>
> I ... THINK it might be possible?
>
> Something like this, maybe (substitute -300 for your timezone offset in
> minutes):
>
> %(pretty{text})%(void(zone{text}))%<(ne -300)%(void(szone{text}))%<(eq 1)
> (Local: %(date2local{text})%(day{text}) %(hour{text}):%02(min{text})
> %(tzone{text}))%>%>
Oh, sure. I guess I was thinking of a more robust solution, that
wouldn't require editing that line when my timezone changes twice a
year. :-)
I.e.,
%(pretty{text})%(void(zone{text}))%<(ne
void(localzone{text})%(void(szone{text}))%<(eq 1) (Local:
%(date2local{text})%(day{text}) %(hour{text}):%02(min{text}) %(tzone{text}))%>%>
paul
=----------------------
paul fox, pgf@foxharp.boston.ma.us (arlington, ma, where it's 34.3 degrees)
Re: displaying Date using local timezone, hymie, 2021/03/16