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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:12:38+00:00 2026-06-04T08:12:38+00:00

How do I get the UTC, PST, EST, etc.. name from this time offset?

  • 0

How do I get the “UTC, PST, EST, etc..” name from this time offset?
You can copy/paste this in any PHP file and it will run.

<?php

date_default_timezone_set('UTC');

$time = '2012-01-01T21:15:00+00:00';

echo '<pre>';
echo "<b>Step 1 (Have the date now)</b>\n";
$time = explode('T', $time);
print_r($time);

echo "\n\n<b>Step 2 (Get the offset)</b>\n";
$offset = explode('+', $time[1]);
$time[1] = $offset[0];
print_r($offset);

echo "\n\n";

echo date('l F jS', strtotime($time[0])) . ', at ' . date('g:ia', strtotime($time[1]));

echo "\n\n";
//
// How do I matchup the offset in this list? 
// The values are -18000, -7200
//
$b = timezone_abbreviations_list();
print_r($b);

Note: I’ve also tried using echo date('c', $time); but perhaps I have something wrong its giving me an error.

  • 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-04T08:12:39+00:00Added an answer on June 4, 2026 at 8:12 am

    In PHP 5.1.0+ echo date('e', $time); will return the timezone information.

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

Sidebar

Related Questions

In my drupal installation I can get the offset from UTC in seconds to
I'm using the following to get utc datetime: import datetime import time from pytz
I am trying to get the offset hours from UTC, given a summer date.
How do I get the current UTC offset (as in time zone, but just
example: os.environ['TZ'] = CST+06CDT,M4.1.0,M10.5.0 I can understand CST, 06 (offset from UTC ?? or
I need to get the UTC offset of the current time zone in Perl
What's the easiest way to get the UTC offset in PHP, relative to the
how can I get the time difference from the string below, I want to
How can I get the GMT time in .net(c#) ... is the UTC time
I want to get the current UTC date with Javascript. How can I do

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.