Previous Thread
Next Thread
Print Thread
Rate Thread
PHP: Date and Time problems #104810 06/06/2003 2:40 AM
Joined: May 2001
Posts: 2,798
Tech-Ni-Kal Offline OP
Member
OP Offline
Member
Joined: May 2001
Posts: 2,798
Currently I am using this code to display the current date and time.

$date_time = date('l M d, Y @ g:i A');
echo ($date_time);


The only problem is that it displays the time in EST, which is a concern, because the site will only be needed for people in the CST. Is there any PHP or whatnot that I can use to offset the time to CST?

Thanks alot.

Sponsored Links
Re: PHP: Date and Time problems #104811 06/06/2003 2:44 AM
Joined: Jan 2000
Posts: 5,074
Charles Capps Offline
Admin Emeritus
Offline
Admin Emeritus
Joined: Jan 2000
Posts: 5,074
RTFM ... smile

date() takes two arguments... the format and a unixtime. Just pass in an adjusted time.


UBB.classic: Love it or hate it, it was mine.
Re: PHP: Date and Time problems #104812 06/06/2003 6:42 PM
Joined: May 2001
Posts: 2,798
Tech-Ni-Kal Offline OP
Member
OP Offline
Member
Joined: May 2001
Posts: 2,798
Alright thanks alot. smile


Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with, and recommend, the following Web Hosts:
· Stable Host
· Blue Host
· Interserver.net
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 810
Joined: July 2001
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,487
Posts293,602
Members13,819
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 21,084
JoshPet 10,370
LK 7,395
Lord Dexter 6,709
Gizmo 5,781
Greg Hard 4,625
Top Posters(30 Days)
isaac 4
Today's Statistics
Currently Online 758
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 21
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2019 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.2
(Snapshot build 20190520)
PHP: 5.4.45 Page Time: 0.034s Queries: 14 (0.011s) Memory: 3.2036 MB (Peak: 3.4343 MB) Data Comp: Zlib Server Time: 2019-05-21 12:34:14 UTC
Valid HTML 5 and Valid CSS