Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Time Zone and Date problems - TxP changing dates in the actual DB
I have 2 main problems here, both of which seemed to start at daylight savings time this year (and I think are related to the time zone and daylight savings settings in admin).
Problem 1: when I go to the write screen, it tells me that “right now” is yesterday, 23 hours ago. I have no idea how to reconcile this, even after reviewing /include/txp_article.php (as there are a bunch of custom date functions creating that date/time).
Problem 2: TxP seems to be changing dates back and forth, starting around 6:00 PM MST, for a few hours. These changes are not just in the display of the date/time on the site, but if I go into the article to check it out, it’s actually changed in the database. First off, this is very, very odd behavior – I’m not sure a CMS should ever do that for data integrity reasons (but it’s very possible I’m just misunderstanding what’s happening). Second, I have no idea where to even start thinking about this problem.
Thank you in advance for your help. This has been an incredibly great forum over the years.
Important stuff to know:
We’re in MST (GMT-7), with daylight savings. These are the settings I have in /admin/preferences. The server is in PST (GMT-8), also presumably with daylight savings.
And in case it helps, this was taken from the diagnostic screen (it’s currently 7:30 PM MST on 12/10/2007):
Textpattern version: 4.0.3 (r1188)
last_update: 2006-03-24 22:31:19/2007-09-12 21:09:27
Permanent link mode: section_title
PHP version: 5.2.3
server_time: 2007-12-10 18:28:25
MySQL: 5.0.24a-standard-log
Locale: en_US.UTF-8
Server: Apache/2.0.54 (Unix) PHP/4.4.7 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.4.2
php_sapi_mode: cgi-fcgi
os_version: Linux 2.4.32-grsec+f6b+gr217+nfs+a32+fuse23+tg+++opt+c8+gr2b-v6.194
Offline
#2 2008-01-11 04:54:52
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Time Zone and Date problems - TxP changing dates in the actual DB
Problem 2: Either you’ve got someone else monkeying with your articles, or this is something to do with your MySQL server. I think it may be the latter, and might be causing the first problem as well.
Offline
Re: Time Zone and Date problems - TxP changing dates in the actual DB
Have you heard any problems related to Dreamhost’s MySQL servers? It seems that there are probably enough TxP installs on there that more people would be having these problems…
Offline
Re: Time Zone and Date problems - TxP changing dates in the actual DB
Nathan
I have had similar problems recently. I’m also on Dreamhost.
It has happened with the 4.0.6 (dev) release and with a crockery release. It has been intermittent. Yesterday it was on the crockery test site. I couldn’t turn off the Daylight setting preference. It was showing 1-11-08 when it was 1-10-08 EST. (
However, the same thing was also happening on the Txp Forums last night during the same time period. Several posts showed “yesterday” because the date was showing as 1-11-08. The real time was 11:31 1-10-08, and my computer had the correct time.
Mike
Offline
Re: Time Zone and Date problems - TxP changing dates in the actual DB
Interesting. I’m wondering if this is a problem with the TxP core or somewhere else.
The thing is – it’d be really easy to not notice unless you’re paying particular attention to dates and times. For me, I wouldn’t have noticed it except that we’re doing a sort of modified calendar that relies heavily on the article’s date.
A quandry.
Offline
Re: Time Zone and Date problems - TxP changing dates in the actual DB
Any chance you are on a Mac?
Offline
Re: Time Zone and Date problems - TxP changing dates in the actual DB
I’m on a Mac and a PC at different times. Why do you ask?
Offline
Re: Time Zone and Date problems - TxP changing dates in the actual DB
I’m really reaching here. I’m using Mac OS 10.5.x.
I can’t figure out why the time stamp was off for the Txp Forums (PunBB) and for Txp. Two Different software packages. I think two different hosts (Isn’t Txp hosted on TextDrive?). That would rule out the software and the servers in my case. (I think)
The only common thread I see is that I was using Safari 3.x on 10.5.x on a Mac for both. Even thought the time appears right on my Mac, perhaps something else is in the system is causing it? I thought if your problem was occurring on a Mac also, that might help narrow it down.
Mike
Last edited by maverick (2008-01-11 22:28:53)
Offline
Re: Time Zone and Date problems - TxP changing dates in the actual DB
It’s good that you’re looking for solutions, but no, it wouldn’t be a browser/OS problem, at least for mine. It’s definitely either the server time, the Textpattern core code, or something with Dreamhost’s MySQL configuration.
And your TXP installation may be installed on TextDrive, but it very well may be somewhere else. In my case, it’s hosted at DreamHost.
Offline
Re: Time Zone and Date problems - TxP changing dates in the actual DB
All my Txp installs are on Dreamhost as well. When I referred to TextDrive, I was referring to the server for these forums.
Sorry it was a dead end.
Mike
Offline
Re: Time Zone and Date problems - TxP changing dates in the actual DB
Oh, gotcha. Sorry ‘bout that.
Offline
#12 2008-01-12 06:48:27
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Time Zone and Date problems - TxP changing dates in the actual DB
Yes, these forums are on Joyent (formerly TextDrive).
However, the same thing was also happening on the Txp Forums last night during the same time period. Several posts showed “yesterday” because the date was showing as 1-11-08. The real time was 11:31 1-10-08, and my computer had the correct time.
That would seem to indicate a MySQL/server OS problem.
Try running the following queries and post the results you get back:
SELECT CONVERT_TZ('2007-03-11 2:00:00','US/Eastern','US/Central');
SELECT CONVERT_TZ('2007-03-11 3:00:00','US/Eastern','US/Central');
Offline