NetTalk Central

Author Topic: Time Zone - Displaying users date and time  (Read 3490 times)

RegionalIT

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Time Zone - Displaying users date and time
« on: September 09, 2012, 04:21:10 PM »
Hi Guys,

We currently have set up a web server application for some of our clients but have run into a slight issue in regards to time zones. The problem that we are having is that we are hosting some of the web servers for some of our American based clients. As we are based in Australia that is where the web server is. When one of our clients prints a report we use a normal date and time stamp to show when it was printed. The only problem with this is that it is printing the date and time of the web server instead of the local machine that the client is using. This is showing up majorly different because of the time zone differences. I've been trying to find a way around this so any ideas suggestions or help on showing/grabbing or calculating the date and time of the users machine rather than the server's would be greatly appreciated.

Thanks,

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Time Zone - Displaying users date and time
« Reply #1 on: September 09, 2012, 10:04:34 PM »
It is possible to get the date and time of the browser, and I can build that into a nettalk build.
Of course that does imply that you "trust" the date and time of the client machine. I would probably counsel that you store both the browser date/time _and_ the server date/time so you can spot inconsistencies. Or at least have some "backup data" in the case that the browser date/time is disputed.

cheers
Bruce




RegionalIT

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Time Zone - Displaying users date and time
« Reply #2 on: September 10, 2012, 05:32:28 PM »
Thanks Bruce.

I thought that their would be a way to retrieve the browser date and time. How would this be done though? I know that the today() and clock() commands don't do it by default so is their a section in the settings somewhere or a different command that I can use to do this? Thank you again for the help though,

Regards,

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Time Zone - Displaying users date and time
« Reply #3 on: September 10, 2012, 09:25:09 PM »
here's a JavaScript method, GetTime which returns the time in Unix Epoch format. There are methods in NetTalk to convert that to Clarion Date & Time. What I think has to happen is to make that really transparent though.

cheers
Bruce