[mythtv-users] UTC -> Local?
me at jonathanrogers.name
Sat Feb 9 19:25:55 UTC 2008
On Feb 9, 2008 11:07 AM, <j2 at mupp.net> wrote:
> So, I finally got a working Wake-via-ACPI routine going, but there
> is one thing that i can't quite figure out: How to convert a UTC-time
> -> Local. Becuase as it is now, the system displays the wakeup
> time at UTC in the display when it shuts down. I would prefer to have it
> in local time.
> Any hints?
The "date" command should do what you want. If you pass it a date
string with the --date option, it will show the local time equivalent.
It seems the date string needs to contain a timezone. For example, if
I use the command 'date --date="19:18:28 UTC"' it returns "Sat Feb 9
14:18:28 EST 2008" since I'm five hours away from UTC. The date
command can be configured to output any format you want, so look it up
in the manpage or info pages.
More information about the mythtv-users