Tak, oczywiście masz rację, ale właśnie program będzie działał na maszynie lokalnej, jak i na serwerze - taki dualizm. W każdym razie udało mi się dojść do pewnego rozwiązania. Otóż gmtime() nie tylko zależy od aktualnej godziny, ale także od sterfy czasowej - w sumie to dość oczywiste. Dla sterfy UT + 0 localtime() i gmtime() zwróci te same wartości, dla pozostałych stref wartości te będą różne. Czyli najważniejsze jest, by użytkownik miał ustawiony poprawnie czas systemowy i strefę. Wtedy nie będzie problemów.
Dodając jeszcze słowo komentarza, powyższa bibiloteka dostarcza funkcję time() zwracającą ilość sekund od 01.01.1970 r. Właśnie o niej myślałem, bo ( http://www.unixtimestamp.com/ ):
The unix time stamp is a way to track time as a running total of seconds. This count starts at the Unix Epoch on January 1st, 1970 at UTC. Therefore, the unix time stamp is merely the number of seconds between a particular date and the Unix Epoch. It should also be pointed out (thanks to the comments from visitors to this site) that this point in time technically does not change no matter where you are located on the globe. This is very useful to computer systems for tracking and sorting dated information in dynamic and distributed applications both online and client side.
Czyli ta funkcja nie zależy od czasu systemowego?
EDIT:
Tak, sprawdziłem, liczba sekund zależy od ustawienia zegara systemowego. Czyli nie ma wzorca czasu w komputerze w postaci niezależnego zegara, chociaż data i godzina w BIOS-ie jest podtrzymwana...