UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Convert To U.s. Pacific Time, Access 2013    
 
   
Javiator
post Oct 18 2018, 02:45 PM
Post#1



Posts: 349
Joined: 8-December 09
From: USA


Greetings,

I'm working on an app that interfaces with a SharePoint list. Our SharePoint servers are running on the U.S. Pacific time zone, but we have offices in other zones. My app uses the Now() function to capture a timestamp when a certain action is taken, and then response time is calculated later on. Is there a simple way to ensure that the value returned by Now() is always converted to the Pacific time zone, regardless of the user's local system time?

Thank you!
Go to the top of the page
 
WildBird
post Oct 18 2018, 08:59 PM
Post#2


UtterAccess VIP
Posts: 3,576
Joined: 19-August 03
From: Auckland, Little Australia


Can you identify where the action took place? Is there a locale identifier basically? If so, could have a lookup table and apply a set offset when doing calculations.

--------------------
Beer, natures brain defragging tool.
Go to the top of the page
 
RJD
post Oct 19 2018, 08:31 AM
Post#3


UtterAccess VIP
Posts: 9,722
Joined: 25-October 10
From: Gulf South USA


Hi: This got my curiosity up. So I looked around for a solution. First, I found a procedure HERE that gets GMT from any local time (as expressed on the local computer). Then I added a routine that calculates PT from GMT, including adjusting for DST (using a US DST table) (I don't know if you can get DST indication from the local computer setting). GMT does not use DST, so the hour difference varies by an hour depending on US DST.

Take a look at the demo attached. Note the table. Then look at the GetPT() function.

This approach will keep you from having different local tables to calculate the PT date/time, adjusted for DST.

Something to consider, at least, and possibly test at different time zone locations ...

Until someone can come up with an easier/simpler solution.

HTH
Joe
Attached File(s)
Attached File  GetPT.zip ( 25.11K )Number of downloads: 7
 

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    16th July 2019 - 10:18 PM