Login
User Name:

Password:



Register
Forgot your password?
Template missing: ADMIN_MEMBER_DELETE
Aug 30, 2010, 9:45 pm
By Kline
Making Messes
Aug 5, 2010, 8:46 pm
By Conner
Personal CSS substitution
Aug 5, 2010, 7:00 pm
By Conner
No preview on post edits?
Aug 5, 2010, 11:17 am
By Conner
Video BBCode Buttons
Aug 3, 2010, 11:12 am
By Conner
QSF Portal 1.5
Author: QSF Portal Team
Submitted by: Samson
Ashlander 3 for QSFP 1.4.6
Author: Samson
Submitted by: Samson
QSF Portal 1.4.6
Author: QSF Portal Team
Submitted by: Samson
Ashlander 3 for QSFP 1.4.5
Author: Samson
Submitted by: Samson
QSF Portal 1.4.5
Author: QSF Portal Team
Submitted by: Samson
CommonCrawl, Yahoo!

Members: 0
Guests: 0
Stats
Files
Topics
Posts
Members
Newest Member
31
197
873
59
norby500
Affiliates
Arthmoor Quicksilver Forums
View our reviews on Hot Scripts
» QSF Portal » QSF Portal Project » Bugs » [Bug:Timezones] Times on post...
Forum Rules | Mark all | Recent Posts

[Bug:Timezones] Times on posts not displaying correctly
< Newer Topic :: Older Topic > Fixed in 1.4.5

Pages:<< prev 1 next >>
Post is unread #1 Jul 30, 2009, 4:35 am
Go to the bottom of the page Go to the top of the page


Samson
Administrator
GroupAdministrators
Posts315
JoinedOct 9, 2006
WWW

On every timestamp the code displays, you can see "yesterday" or "today" if the post was recent enough. This should be displayed relative to your selected timezone. Due to a bug in the display code, it was easily possible to have posts show "today" when the time clearly was not possible yet, "yesterday" posts would actually be up to 3 days old, and things that were actually posted on the same day would simply show the current date. It's not always easy to spot either since timezones are involved. Turned out to be a really easy fix, though very subtle:

Index: C:/Code Repositories/QSFP Branch/qsfportal/global.php
===================================================================
--- C:/Code Repositories/QSFP Branch/qsfportal/global.php	(revision 341)
+++ C:/Code Repositories/QSFP Branch/qsfportal/global.php	(revision 342)
@@ -471,10 +471,10 @@
 		// Use the user's chosen GMT offset, ie: GMT-8 = Pacific time, US
 		$tz_offset = $this->user['user_timezone'] * 3600;
 		$time = $gmt_time + $tz_offset;
-		$current_tz_time = $this->time + $tz_offset;
+		$current_tz_time = $this->time;
 
 		// DST adjustment if needed. Yes, it needs to know the current time so it can trick old posts into looking right.
-		if( date( "I", $this->time ) == 1 ) {
+		if( date( "I", $current_tz_time ) == 1 ) {
 			$time += 3600;
 		}


This will be fixed with the 1.4.5 code release and should put the issue of timezones and displays to rest. .........................
PDNS-Admin | Sandbox | Arthmoor MUD Hosting Services | The Truth About Medievia: A Saga of Code Theft.

"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
       
Pages:<< prev 1 next >>