Solved

local time and time zone calculations

Posted on 2003-10-29
4
243 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 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