Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

How do I set the time and date?

by faq_monk (Initiate)
on Oct 08, 1999 at 00:29 UTC ( #720=perlfaq nodetype: print w/ replies, xml ) Need Help??

Current Perl documentation can be found at

Here is our local, out-dated (pre-5.6) version:

Assuming you're running under sufficient permissions, you should be able to set the system-wide date and time by running the date(1) program. (There is no way to set the time and date on a per-process basis.) This mechanism will work for Unix, MS-DOS, Windows, and NT; the VMS equivalent is set time.

However, if all you want to do is change your timezone, you can probably get away with setting an environment variable:

    $ENV{TZ} = "MST7MDT";                  # unixish
    system "trn comp.lang.perl.misc";

Log In?

What's my password?
Create A New User
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2015-10-04 11:21 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (101 votes), past polls