?
Solved

convert php timestamp to timezone

Posted on 2013-11-21
3
Medium Priority
?
426 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
[X]
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
3 Comments
 
LVL 16

Accepted Solution

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

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

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
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 look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

741 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