Solved

Date and Time PHP Code?

Posted on 2013-06-01
2
391 Views
Last Modified: 2013-06-19
I've go this:

<?php date_default_timezone_set('UTC'); echo date('l, F d, Y'); ?>

but it's showing up day forward.

How can I get current USA, New York timezone?
0
Comment
Question by:sandshakimi
2 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39213771
<?php date_default_timezone_set('America/New_York'); echo date('l, F d, Y'); ?>

http://us2.php.net/manual/en/timezones.america.php
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 39214586
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses how to create an extensible mechanism for linked drop downs.
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…
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.

820 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