topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday November 2, 2024, 8:31 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Urgent request for informatioon regarding time stamp in Windows 8  (Read 7386 times)

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
I have a problem that just started today where it seems that everyone who uploads files or creates a folder on a website gets the time changed by 12 hours which results in the DATE being off for anything done in the afternoon showing the date as being the following date. Files loaded at 11 am on the 21st show a date of the 22nd.  

Changing the system date on the server only results in the same "effect", with the date being changed by 12 hours regardless.

SYSTEM INFO:
Windows 7
Apachi Server
MySQL
All updates for Windows are current
Avast!
Malwarebytes

Does anybody have any idea what might cause this?

Let me add to this that even accessing this site, I am getting scripting errors, and wonder if java could be involved.
« Last Edit: January 27, 2015, 10:19 PM by questorfla, Reason: SOLVED! »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #1 on: January 21, 2015, 06:58 PM »
Is the time zone set properly?

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #2 on: January 21, 2015, 07:10 PM »
Yes, the time is perfect
the website is set to display the time of the system it is logged in on and if i am on the web server and connect to the site i see the exact same date and time that the server says it is.
Moreover, if i look in the directory holding the files and folders they also show the correct date and time.  The ONLY place i can go to see this effect is to connect to the website.  On it, the date will show tomorrow.  It does not display the time but I have run tests to prove this happens at the noon/midnight mark so it is the am/pm issue causing it.

Another odd thing is that on the website server using Internet explorer 11 i cannot even post on this site as i get constant script errors.  Using Maxthon, I am able to work fine.  I presume Firefox and Chrome would work also but have not tried,
This leads me to believe that in some way possibly JAVA is the culprit?
I am fairly sure that it isn't actually the browser at fault since the same "wrong" date shows even using safari on an Apple.

Thee fact that yesterday this (as far as anyone knows) was not an issue is all I can say.  Of course, it COULD be that no one notice until today because normally the date associated with a file or folder is not relevant

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #3 on: January 21, 2015, 07:16 PM »
Add a little extra to the Mix.
If i upload a document created on the 20th, it shows that it has a date of the 22nd already.  If i DOWNLOAD that same document back to the web-server, it shows the 21st which is correct.  The only time it LOOKS wrong is when it is viewed through a browser on the website. 

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,937
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #4 on: January 21, 2015, 08:17 PM »
You state that the time shown on your computer matches with the time/date you get from a website. It is easy to have a computer in the wrong time-zone tell the correct time and date. Especially when it is configured not to auto-update. So it is important that you verify your computer uses the correct time-zone.

Such a setting I am forced to use myself. All Windows servers I run here are all 1 hour off. And yes, I did verify that these are in the correct time zone :P

But even when I specifically configure to have no updates from any of the standard time servers that are default configured in Windows, within 8 hours my servers are all 1 hour behind again. This behavior is something I am accustomed to in the "no mans land" that exists between the US and Europe (the US uses the solstices, most of the other countries use the seasonal change, which are usually 2-3 weeks apart). A nuisance in an otherwise reasonably functioning system of monitoring the passage of time. Here in Paraguay the president decides the moments of DST changes each year. The current president didn't make a reasonable choice for me. Almost 2 moths of a discrepancy! Which isn't adjusted correctly anymore in my Windows servers when updating with any of the time servers I can reach here.


Getting timing right on a computer looks deceptively easy, but it really isn't. Especially when you have to work with different international time zones and systems of the DST changes.

Imagine the following: Offer a programmer money and a programming job that includes the above. Then offer them to to give them a kick in the nuts and the same amount of money.
An inexperienced programmer will choose the money and the job. A programmer with experience in this field will choose the money and the kick in the nuts...because that is the less painful way of making easy money.

There is a nice/funny youtube video that explains the implications of time zones and DST in a much nicer and funnier way than I can.   

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #5 on: January 21, 2015, 10:50 PM »
It isn't a time zone thing and the systems are synced 100% correctly to the  Time.Windows   clock. (though i have tried the US nationals to nothing helps) 
The files even display the correct time on my local screen when I look at them in the folder on the harddrive.  But when they display in a browser they have suddenly time-shifted by 12 hours into tomorrow.  It almost has to be something to do with the software that puts the directory display on the web but I can't find any place I can see this happen.
something in Apache, Java, Php, MySql  whatever it is, it isn't "really" changing anything it just adds 12 hours so that the date change happens at 12 noon instead of 12 midnight.  That is about as clear as I can put it because I cannot prove it other than with a screen shot of the website.  The real files that are displayed from here on the server are showing the right date and time both of when they were created as well as when they were edited or modified or any other stamps.
This has to be some kind of artifact of the web-displaying software since it is only a displayed time that is incorrect.  the real time for everything is what it should be.  But the effect is exactly 12 hours of added time to whatever the real time stamp is.

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,649
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #6 on: January 22, 2015, 11:32 AM »
I think your answer lies here:

Add a little extra to the Mix.
If i upload a document created on the 20th, it shows that it has a date of the 22nd already.  If i DOWNLOAD that same document back to the web-server, it shows the 21st which is correct.  The only time it LOOKS wrong is when it is viewed through a browser on the website.  

What is the time offset where you're at?? It's possible that Apache is using either straight UTC, or is running off its own time offset for the directory browsing dates.

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #7 on: January 22, 2015, 03:01 PM »
You may well be right.  I had o find a lot of tools i have not used in years like wingrep etc but I have found references that lead me to believe this may be something that has always been like this  since the beginning due to something in the my.ini file. 

$row["created"] = FormatDateTimeStamp(inputMySQLTimestamp($row["created"]), DT_MID_DATETIME);

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #8 on: January 22, 2015, 03:03 PM »
You are a good man Stoic :) :-*

I guess great minds think alike but i wish i had read tyour post sooner as it might have saved me looking.  But technically I needed to look in order to be able to trace the results if i make changes anyway.  
Any knowledge gained is never wasted.
I just cant find the place to edit in my.ini to set anything but i have found many references to it being there.  This is MySql V5.1 too.
« Last Edit: January 22, 2015, 03:05 PM by questorfla, Reason: added info »

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #9 on: January 22, 2015, 03:17 PM »
mysql> SET GLOBAL time_zone = timezone;

OK i am getting in over my head now.  I have seen enough of this to be pretty darned sure hat the problem is the global timezone used in Mysql.  But the statement I see to set this don't look the exactly the same format as those in the my.ini. (which i finally located) Nor do I see the specific location line number where this should go   

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #10 on: January 22, 2015, 03:30 PM »
[Date]

date.timezone = "UTC"

This I have located in the PHP.ini but cannot find a  corresponding in MY.ini and the program looks to me as though it is looking to MySql for these timestamps, not to the php software.

Thanks for all the help here this is not something i have ever tried to troubleshoot before,  But I guarantee I will never forget!

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #11 on: January 22, 2015, 04:37 PM »
This I have located in the PHP.ini but cannot find a  corresponding in MY.ini and the program looks to me as though it is looking to MySql for these timestamps, not to the php software.

Apache/website would be using PHP to access MySQL for both reading/writing information would it not?

May be useful (or not): How To Synchronize Your PHP and MySQL Timezones

That's from 2011 but since you're using an old version of MySQL it may still be relevant.

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #12 on: January 27, 2015, 10:10 PM »
Yep.   In a round about (and direct as well) way this was the problem.  This who9le setup was written or rather patched together by a group of people from various locations over  long amounbt of time.
Each one brought their own unique view on things as well as several ini files which left me ponering who had the controls at the time of the "mis" time. I finally found it (al;ong with several others all set to various world/wide timezones.  I have just never dealt with one where there wasn't a single over-all php.ini (There was one or two of those too) plus a few others.

I finally found the key to beating them all which was to use .htaccess since each module had its own copy, i was able to add the correct code to each that made the PHP stamp end up in the correct international timezone regardless of who wrote what.  This is NOT your normal DB software for sure.  Looked like a combined effort of everyone in the EU.  Plus the program that provides the MySql and the PhP and Apache modules also tries to provide the proper starting time based on UTC.

I just had to stop doing anything else to focus on tracking a single entry from satrt to display.    I originally thought it to be simplay a display artifact since if i downloaded the file it nevber had the incorrect dae or time.  But it actually turhd out that by doing a dump from the MySQ:L tables they really were being input at 12:30 min ahead.  However, if accessed through MySql and downloaded back to the place of origin, the reverse time swing put the correct ime back in due to the reverse order of actions. 

The files really had the incorrect time stamp as long as they were inside the DB.  I had ben looking at the display section which was the wrong place to look.  Afetr creating a new setupand adding a few files then pulling a full dump fr4om MySQL it was easy to see that inside the DB they were 12:30 ahead.  Turned out that particular module contained inside a modified script that was done by a programmer in the New Delhi TZ which is UTC+5:30.  I am UTC-6.  A total of exactly 11:30 and forward across the dateline.

The SQL dump is how i finally fund which one did the deed due to the exact 11:30 (I originally thought it to be 12:00 hours even).  There are not many places at UTC-5:30 so...
I have to say that I learned a lot from the experience.  And to give Shaed his Due :Thmbsup:  I 100% agree that this is sloppy control.  But the place i work for is well known for not shopping for software at the equivalent of the Doillar Store of Software!  :)  Lots of fun.  N OT!


Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,649
    • View Profile
    • Donate to Member
Re: Urgent request for informatioon regarding time stamp in Windows 8
« Reply #13 on: January 28, 2015, 06:48 AM »
Afetr creating a new setupand adding a few files then pulling a full dump fr4om MySQL it was easy to see that inside the DB they were 12:30 ahead.  Turned out that particular module contained inside a modified script that was done by a programmer in the New Delhi TZ which is UTC+5:30.  I am UTC-6.  A total of exactly 11:30 and forward across the dateline.

Okay, that has got to suck bad enough for some kind of award ... Holy shit!