Print Page | Close Window

Message Post Date

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=3235
Printed Date: 01 April 2026 at 11:10am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Message Post Date
Posted By: ljamal
Subject: Message Post Date
Date Posted: 03 June 2003 at 9:23am
The PM dates are created by the database, but the message post dates are created by the web server. With 7.02 do you think it would be to correct this so that the same source sets the date? When you are using the forum with the database and web server in the same time zone any difference is not noticeable, but my database is 3 time zones away so if I post a PM and a message at the same time, the messages appear to be 3 hours apart.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



Replies:
Posted By: WebWiz-Bruce
Date Posted: 03 June 2003 at 3:51pm
I'll look into it.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: vdub
Date Posted: 03 June 2003 at 5:27pm

If you go in to your profile you can set the time offset.



-------------
http://www.CyberCPU.net - Hardware reviews, Forum, Free advertising!!!!


Posted By: ljamal
Date Posted: 03 June 2003 at 7:27pm
This has nothing to do with the time offset. The data is being entered from two different sources, the server (posts) and the database (PMs). Even with the time offset the times (in my case) will be off by 3 hours because the database and server are in different time zones.

To put it simply with PMs the date is autofilled by the database and with posts the date is supplied to the record set with
strPostDateTime     = Now()
and
.Fields("Message_date")     = strPostDateTime


The quick fix is to just remove the
.Fields("Message_date")     = strPostDateTime
line as the databases already default to the current time.


-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: WebWiz-Bruce
Date Posted: 04 June 2003 at 1:50am

You don't want to move:-

.Fields("Message_date") = strPostDateTime

There is a reason for this, I can't remeber 100% why, but as I recall there was a problem with the topic start date in the tblTopic and the message date in the tblThread table being out of sync with each other by a couple of milli-seconds this then gave problems when moving and deleting posts.

The simplest solution is to get the PM date from the web server as well.



-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: ljamal
Date Posted: 04 June 2003 at 8:56am
What I actually did was just change the initialization of strPostDateTime to:
strPostDateTime     = getDate()

since I use SQL Server that solved the problem, but it will not work for Access users. I prefer to get the times from the database server when possible because when dealing with web server farms it keeps the dates in sync when the web server times may be slightly different.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net