Solved

local time and time zone calculations

Posted on 2003-10-29
4
241 Views
Last Modified: 2013-12-18
I have a table of cities we work with.  Each column represents a time zone.  At the top of each column, I have  computed text to display the current day and time.  I'm using @Adjust in my time calculations, and it works great in my own time zone.  However, it doesn't travel well.  

How can I compute the time for a specific time zone?  Something like @Now(GMTtimezone).
0
Comment
Question by:SandraE
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
qwaletee earned 500 total points
ID: 9648164
Hi SandraE,

Use @Zone(timeDateValue) to get the offset from "GMT" (GMT is no longe the true standard, but that is an esoteric discussion not relevant to solving your problem).

Once you compute teh zone offset, you can of course use @Adjust to convert it to another offset.

Ah, but how to find the offset amount of a different timezone?  Build a text string to contain a time based in a specific time zone.  Use @TextToTime to convert that to a date-time value. Use @Zone to discover the "GMT" offset of that zone. Adjust accordingly.

For example, I am in NY, which is EST.  LA is in Pacific time, or PST.

local := @Zone(@Now) return 5 (you will need to handle daylight savings differently)
remote := @Zone(@TextToTime("1/1/2001 1:00 AM PST")) returns 8 -- it would be 4 AM EST.
dif := local - remote returns -3 (3 hour time difference, remote location is earlier)
@Now reurns 10/30/2003 2:04:15 AM
@Adjust(@Now; 0; 0; 0; -5; 0; 0) returns 10/29/2001 11:04:15 AM

Best regards,
qwaletee
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9648180
Note:

You need special andling for daylight savings time and for "partial hour offsets" (time zones where for example the offset is 5,5 hours instead of 5 or 6, or even 5,25 or 5,75 -- there are a few such zone)

Red up on @Zone to determine these differences.  Particular trouble can be had when trying to match one DST to another DST, or for that matter, a DST to a non-DST and a non-DST to a DST.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now