filemtime - GMT or local (server) timestamp

php

Solution

The filemtime function returns a timestamp, which is to say it returns the number of seconds since the Unix Epoch. Timezones are inconsequential to timestamps; Midnight 1/1/1970 UTC happened simultaneously everywhere, afterall. Timezones represent an offset to be applied to this amount of seconds in order to reach the relative time for the region.

In other words, if you look at the integral value of a timestamp, change your timezone, and look at it again, it'll still be the same number. The difference comes when you use a function like date() to format that number to a timezone-relative date/time. See this comment on the usage of time().

Problem

filemtime — Gets file modification time This function returns the time when the data blocks of a file were being written to, that is, the time when the content of the file was changed. My question: is filemtime returning: - gmt timestamp (modification time) of the file (like time() ) ? - or local server timestamp of the file? EDIT: probably the definition of "timestamp" is same as time() (This count starts at the Unix Epoch on January 1st, 1970 at UTC)

Original source