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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:45:33+00:00 2026-06-01T14:45:33+00:00

Given a date and time structured as: 2011-10-21 14:44:19 which is known to be

  • 0

Given a date and time structured as:

“2011-10-21 14:44:19”

which is known to be Pacific Time (adjusted for Daylight Savings when appropriate), I need to parse the DateTime and convert it to UTC, irrespective of the current server time.

I have seen this very similar question that starts with the assumption that the original DateTime is in UTC:

How to format a datetime to GMT irrespective of regional settings?

I’m trying to apply that to my situation, but don’t understand how to begin with a Pacific Time (PST or PDT as appropriate) string and arrive at a UTC DateTime. Specifically, that solution applies the flag DateTimeStyles.AssumeUniversal, whereas I need to assume Pacific Time.

  • 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-06-01T14:45:34+00:00Added an answer on June 1, 2026 at 2:45 pm

    You are going to have to use TimeZoneInfo.ConvertTimeToUtc(DateTime, TimeZoneInfo) to make the conversion. The server’s timezone doesn’t matter. Use FindSystemTimeZoneById() to select the timezone you pass as the second argument. You’ll want “Pacific Standard Time” for the id.

    This function uses a timezone database that’s stored in the registry and maintained by Windows. Timezone rules change over time, particularly daylight savings transitions, so keeping Windows Update active on that machine is important to allow Microsoft to update the database. Clearly knowing exactly where the string came from is important for this to work correctly at all.

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

Sidebar

Related Questions

DateTime::Diff should calculate a proper interval and take into account Daylight Savings Time (DST)
Given a date/time as an array of (year, month, day, hour, minute, second), how
I want to remotely tag a CVS archive for a given date and time,
I'm trying to calculate time blocks from given date range. Here's my attempt: <?php
I have noticed that regardless of a given script's execution time, every date() call
Given a datetime.time value in Python, is there a standard way to add an
I have a service that give me a date time string in the following
The Python datetime.isocalendar() method returns a tuple (ISO_year, ISO_week_number, ISO_weekday) for the given datetime
Given a DateTime representing a person's birthday, how do I calculate their age in
In MS SQL 2000 and 2005, given a datetime such as '2008-09-25 12:34:56' what

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.