Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Zmiana daty z "angielskiej" na "polska"
xeron01
post 8.12.2011, 21:27:46
Post #1





Grupa: Zarejestrowani
Postów: 14
Pomógł: 0
Dołączył: 30.11.2011

Ostrzeżenie: (0%)
-----


Szukałem jak zmienić , lecz nigdzie nieznalazłem dokładnej odpowiedzi:
Mam kod:

Kod
header("ETag: PUB" . time());
header("Last-Modified: " . gmdate("D, d M Y H:i:s", time()-10) . " GMT");
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 5) . " GMT");
header("Pragma: no-cache");
header("Cache-Control: max-age=1, s-maxage=1, no-cache, must-revalidate");
session_cache_limiter("nocache");



I chcem aby zamiast 8.23 wyswietlało 20.23 i polskie nazwy miesięcy, ktos chce poświecić chwile?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Uriziel01
post 9.12.2011, 10:26:47
Post #2





Grupa: Zarejestrowani
Postów: 307
Pomógł: 37
Dołączył: 9.11.2010
Skąd: Zielona Góra

Ostrzeżenie: (0%)
-----


Niestety tak wygenerowany nagłówek tak jak juz powiedział mój poprzednik nie będzie poprawny.
Odsyłam do linku:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

W specyfikacji tej czytamy wyraźnie:
Cytat
The format is an absolute date and time as defined by HTTP-date in section 3.3.1; it MUST be in RFC 1123 date format:

Expires = "Expires" ":" HTTP-date

An example of its use is

Expires: Thu, 01 Dec 1994 16:00:00 GMT

Note: if a response includes a Cache-Control field with the max-
age directive (see section 14.9.3), that directive overrides the
Expires field.

HTTP/1.1 clients and caches MUST treat other invalid date formats, especially including the value "0", as in the past (i.e., "already expired").


No i na koniec specyfikacja, RFC 1123:
http://www.ietf.org/rfc/rfc1123.txt

Ten post edytował Uriziel01 9.12.2011, 10:27:09
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 29.06.2025 - 04:56