Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 131943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:11:05+00:00 2026-05-11T06:11:05+00:00

I’m working on a site that lets users add calendar entries, on the main

  • 0

I’m working on a site that lets users add calendar entries, on the main page all users can then see these entries with some text saying how long until those entries are current for example

Entry 1 : 5 Minutes
Entry 2 : 7 Hours
Entry 3 : 4 Days

The problem I’m having is that everyone could be in different timezones. I’ve decided I want to store all times/dates in GMT.

What I’m sturggling with is when a user submits a calendar entry say for 1/1/2009 10:30AM I then need to work out what this date time is in GMT for storage. Is there a way of knowing what the users local timezone/time is so I can compare it to server time (GMT) to make the conversion?

I really hope this makes sense. I’m hoping I can do this without having to ask the user what timezone they are in, or forcing the user to enter all datetimes in GMT.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:11:06+00:00Added an answer on May 11, 2026 at 6:11 am

    COnvert the datetime to GMT client side (in JavaScript if this is a web app) before sending it to the server. Let the server only work with GMT (I would say UTC). Same thing for displaying dates/time. Send GMT/UTC to client, and let JS localize. This is the only completely safe way in my opinion, because you let it be up to the users operating system to figure out what the time is supposed to be.

    There are other approaches of cause, and if you only need to know what the client’s time is right now you can just get the offset from it (can be retrieved through JS etc). But if you need accurate dates/times in different locations for historical and future date/times you better let the client handle it.

    PS: In my TimeZone implementation I also use UNIX time format for communication between client and server. This is just plain easier to parse, and I belive it’s the native datetime format for JS. I can’t present my code for you now, but should be relatively easy to google for this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.