Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

convert php timestamp to timezone

Posted on 2013-11-21
3
391 Views
Last Modified: 2013-11-22
I'm writing a wordpress plugin to send out appointment reminders and it seems the appointments are stored in UTC on the  server.

I can get the appointment timestamp just fine, but I can't seem to convert it from UTC to 'Atlantic/Bermuda' time zone.

PHP 5.2, can some one help me convert a timestamp to that of a different timezone?
0
Comment
Question by:tf2012
3 Comments
 
LVL 16

Accepted Solution

by:
HagayMandel earned 500 total points
ID: 39667317
This article will assist you.
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 39667678
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html

If you know the UNIX timestamp, you're in luck because it's the same all over the world at any given moment.  You can convert it into a "local" time with PHP built-in capabilities.  There are procedural ways described in the article, and there is an object-oriented thing, too.  See the examples here:
http://php.net/manual/en/datetime.settimezone.php
0
 
LVL 1

Author Closing Comment

by:tf2012
ID: 39668350
great thanks!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question