On Wed, May 15, 2024 at 12:04 AM Grisha Levit <grishale...@gmail.com> wrote:
>
> On Tue, May 14 2024 at 16:05 Peng Yu wrote:
> > For example, in the time zone represented by +0100, how to get its
> > current time from date using '+0100' as input? Thanks.
>
> Use the offset to create a timezone specification, supplied in the TZ
> environment variable.
>
>     TZ='XXX-01:00' date

Strings like +0100 is relative to UTC. For example, +0100 is Central
European Time. I guess that you understood +0100 as relative to my
current timezone.

How to achieve +0100 as relative to UTC with date?

> The `XXX` is an arbitrary (required) name. Note that the sign of the
> offset has the opposite of its usual meaning. The full format can be
> found in the tzset(3) man page.

-- 
Regards,
Peng

Reply via email to