Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

convert php timestamp to timezone

Posted on 2013-11-21
3
Medium Priority
?
442 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
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.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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 …
Suggested Courses

618 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