TIP: Click on subject to list as thread! ANSI
echo: perl
to: Johan Billing
from: Maurice Kinal
date: 2005-02-22 13:35:58
subject: What time is it Mr. Wolf?

Hey Johan!

Okay I played with the POSIX module and found this gem,

    strftime "%H %M", gmtime;

which produces the hour and minute of UTC wrt localtime.  If localtime is
UTC then it produces the exact same hour as,

    strftime "%H %M", localtime;

but if localtime is anything else, such as PST which is what the machine I
tested this on is set to, then gmtime adjusts the hour (and whatever other
variable that requires adjustment) to UTC.  Works excellent!  I like it!

Yeppers, the POSIX module is a handy, dandy tool to have onboard.  I think
it's a keeper.

Life is good,
Maurice

--- Msged/LNX 6.1.2
* Origin: Coffin Point - Ladysmith, BC Canada (1:153/401.1)
SEEN-BY: 633/267 270
@PATH: 153/401 307 140/1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.