• Post Reply Bookmark Topic Watch Topic
  • New Topic

Convert date from server time to client time  RSS feed

 
Alex Loaiza
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I need to convert a date saved on server's db in PST timezone (GMT -8) to client's timezone...but I have to do this on the server (not on the client using javascript)...I can access the current timezone for the client based on a property that is stored on db once the user logs into the system...so, what can I do?, please help!!!

 
Paul Clapham
Sheriff
Posts: 22509
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something like this, assuming you have already got a Date object from the database:I don't know if this is what you had in mind, but don't waste any time trying to get a Date object in the client's time zone. Dates don't have a time zone so it wouldn't make any sense to try that.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!