Solved

convert php timestamp to timezone

Posted on 2013-11-21
3
378 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 108

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now