views:

513

answers:

4

hi guys,

im using httpclient and last-modified header in order to retrieve the last updated date of an html file however when i try this on a linux box it returns yesterdays date but when i use a windows machine it returns todays date. is anyone aware of issues using this header field in linux?

+1  A: 

Perhaps, linux server has its clock set differently and this way "lives in the past"?

ADEpt
A: 

If you dualboot with Windows, you must make sure your Linux system is configured to not think the BIOS keeps the clock in GMT (or UTC), but in local time. Otherwise your Linux system's clock will keep being off when in Linux.

Also make sure that the /etc/localtime file is a symlink to the correct time zone file under /usr/share/zoneinfo.

After configuring those two things, verify your date and time is correct using the date command and set it correctly if it isn't, via:

date MMDDhhmmCCYY.ss

For example, for the current time at my end (19:41:27 on October 15th 2008) I would use:

date 101519412008.27

Mihai Limbășan
A: 

Just a thought - perhaps your filesystem was mounted with the noatime option. I'm making the assumption here that your html file wasn't modified, only accessed without changes and the 'updated' time wasn't recorded.

Can you see the timestamp of the file? Is it exactly 1 day out, or just sometime yesterday?

gbjbaanb
A: 

when i look at the date assocaiated with the time it is correct, but then the date that gets displayed after i call the http method is one day behind. Possibly a problem with caching

combi001