Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
At my company, we run several instances of a scheduler program all around the world. All any of them care about is 'what is my local time?'. The user makes the adjustment. For instance, I'm in Minneapolis, MN and the scheduler that I'm looking at is in Sydney, Australia. I have to keep track of the time difference (right now, it is 17 hours I think). I think that this is the way to go. If you will be doing anything local to the server, you should be doing everything on the servers time.

Of course, if it really matters to you, you could do some version of an rsh to the remote server to execute a timelocal((localtime())[0,1,2,3,4,5]) and store it in a variable. Do the same thing on the client side, and find the difference between the two. Pass the difference into gmtime to get the difference in hours and minutes (not all timezones are an integer number of hours apart, so the minutes are necessary).

thor

In reply to Re: Time Zones and Users by thor
in thread Time Zones and Users by Torgo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-19 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found