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 801615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:28:07+00:00 2026-05-14T23:28:07+00:00

I’m working on a blog and want to show my posts in eastern time

  • 0

I’m working on a blog and want to show my posts in eastern time zone. i figured that storing everything UTC would be the proper way. This creates a few challenges though:

  1. I have to convert all times from UTC to Eastern. This is not a biggie but adds a lot of code.

  2. And the “biggie” is that I use a short-date time to reference the posts by passing in a query, ala blogger. The problem is that there is no way to convert the short date time to the proper UTC date because I’m lacking the posted time info.

Hmm, any problem to just storing all dates in eastern time? This would certainly make it easier for the rest of the application but if I needed to change time zones everything would be stored wrong.

Update

@Jon, very much value your expertise, but I’ve decided storing UTC time in database is wrong. You may be able to convince me otherwise though!

So, let me give you the full skinny of it. I converted all the times to UTC, which required adding a lot more “syntax” in the declarative parts of the code.

What I’m coding is a blog, so I have 2 routes, a list route and a details route. The details route takes a short date and the name of the post which is assumes the combined to be unique. This is why it breaks down. I pass the short route in the query.

Depending on Time of Day, we can wrap around so that it is 29 or 30. So the short date must be correct because I don’t have enough information in the query to determine how to convert the eastern time back to UTC.

I was storing a DatePosted “short date” with all times @ 12 AM for SQL purposes and a FirstModified long date for the time. So, I said, okay no problem, I’ll just store the short date in eastern and then convert long date to eastern. No go because I can’t make those query work.

So, I decided I went about this all wrong. The date should always be stored in eastern time (the time I want to use). And then if the user wants to change time zone (not a requirement), we just go through all the entries and change them.

Maybe, I’m thinking about this wrong but in my case there will only ever be eastern time zone used, so it is a waste of time either way.

Look forward to any input on this!

The key problems:

  1. I’m passing in a short date in the query. If this short date is in UTC then the date in the query could be off by 1. If I pass the short date as eastern then I will need a linq-to-sql syntax that can converted to SQL that will allow me to compare date times of different time zones.

Thanks again for all help!

  • 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-14T23:28:08+00:00Added an answer on May 14, 2026 at 11:28 pm

    It’s just a blog and not a business web app used by offices around the world, so I say go ahead and use Eastern Time.

    If you ever changed time zones, and wanted to display the new time zone, one SQL update statement can update all the times to the new zone.

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

Sidebar

Related Questions

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 want to show the soap response to UIWebview.. my soap response is, <p><img
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
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace

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.