Solved

Date and Time PHP Code?

Posted on 2013-06-01
2
386 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 82

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 108

Expert Comment

by:Ray Paseur
ID: 39214586
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
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…
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…

707 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

17 Experts available now in Live!

Get 1:1 Help Now