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

  • SEARCH
  • Home
  • 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 3349868
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:43:03+00:00 2026-05-18T01:43:03+00:00

We’ve been working on implementing timezone support for our Web app. This great SO

  • 0

We’ve been working on implementing timezone support for our Web app.

This great SO post has helped us a bunch: Daylight saving time and time zone best practices

We’ve implelmented the OLSON TZ database in MYSQL and are using that for TZ conversions.

We’re building a scheduling app so:

We are storing all our bookings which occur on a specific date at a specific time in UTC time in DateTime fields and converting them using CONVERT_TZ(). This is working great.

What we aren’t so sure about is stuff like vacations and breaks:

Vacations are just Date references and don’t include a time portion. Because CONVERT_TZ() doesn’t work on date objects we are guessing that we are best to just store the date value as per the user’s timezone?

id1 id3 startDate   endDate
-----------------------------
3   6   2010-12-25  2011-01-03
4   3   2010-09-22  2010-09-26

Same thing with recurring breaks during stored for each day of the week. We currently store their breaks indexed 0-6 for each day of the week. Because these are just time objects we can’t use CONVERT_TZ() and assume we should just store them as time values in the user’s time zone?

bID sID dayID startTime  endTime
--------------------------------
1   4   1   12:00:00    14:00:00
2   4   4   13:30:00    13:30:00

In this case with vacations and breaks we would only compare them to booking times AFTER the booking times have been converted to the user’s local time.

Is this the correct way to handle things, or should we be storing both vacations and breaks in some other way so that we can convert them to UTC (not sure how this would work for breaks).

Thanks for your assistance!

  • 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. Editorial Team
    Editorial Team
    2026-05-18T01:43:04+00:00Added an answer on May 18, 2026 at 1:43 am

    The two storage formats look fine. You just need to convert them to the user’s local time when you pull them out of the table.

    Actually, for the breaks table I presume they’re already nominally in local time, so you just compare directly against the local time of the appointment.

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

Sidebar

Related Questions

I need to clean up various Word 'smart' characters in user input, including but
i want to parse a xhtml file and display in UITableView. what is the
public static bool CheckLogin(string Username, string Password, bool AutoLogin) { bool LoginSuccessful; // Trim

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.