![]() |
dates -- > local and gmt
vsem privet,
function time() daet UNIX timestemp servernogo vremeni ..... kak mne poluchit' GMT vremja esli ja ne znau gde naxodit'sja server ????? HELP |
The local time is not included in HTTP request, therefore there is no way you can get it using PHP directly. You can solve this problem by asking your visitors to provide their GMT timezone once and then write it to the cookies. Another option is to use JavaScript for getting user's local time and then pass it to the PHP script. Something like this:
Код:
<script type="text/javascript">Код:
// ................................... |
ninetyniner
You see i don't care about USER time and zone , i need server time and i need to know what zone server is in after that i can calculate GMT time based on server time and zone ....... function time(); gives you server not user time. THE END GOAL is to know server time zone. Not gmt or any other time. |
up
|
Прости, я не очень понял, что ты хочешь получить:
1. GMT-время на сервере? 2. Время на сервере в его локальной временной зоне? Если первое -- gmdate(), если второе -- date(). Разумеется, для правильной работы обеих функций сервер должен быть адекватно настроен. |
kogda ja delau time(); servak mne daet unix timestemp vremenni kotoroe na servere. vse xorosho NO ento ne GMT vremja , a mne nuzno ono ...... t.k. potom ento vremja budet ispol'zovat'sja s opredelennoi vremennoi zonnoi !
mne nado uznat' kakaja vremennaja zona stoit v nastroikax OS na servere , chto bi delat' normal'nuu GMT datu ( ja ne ispol'zuu timestemp (pishu datu v svoem formate) i posle delat' s nei ve chto mne zaxochet'sja! Crazy Разумеется, для правильной работы обеих функций сервер должен быть адекватно настроен. a esli on ne pravil'no nastroen ?!!? |
gmstrftime()
|
| Часовой пояс GMT +4, время: 17:52. |
Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.