🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.lang.php
3 messages
3 total messages Started by zlotowinfo Wed, 18 Feb 2015 09:37
data+czas w php
#230922
Author: zlotowinfo
Date: Wed, 18 Feb 2015 09:37
11 lines
1296 bytes
  $xdate=date("U", mktime(11, 2, 0, date("m"), date("j"), date("y")));
  echo     "$xdate - ".date('Y-m-d h:m:s',$xdate    ).'<br>';
  echo "1424296800 - ".date('Y-m-d h:m:s',1424296800);


wyświetlone:
1424253720 - 2015-02-18 11:02:00
1424296800 - 2015-02-18 11:02:00

nie mogę zrozumieć jak zostałą wygenerowana ta druga cyfra
a wskazuje na tę samą datę i czas
Re: data+czas w php
#230923
Author: Wojtek Gapiński
Date: Wed, 18 Feb 2015 10:09
22 lines
1506 bytes
W dniu 18-02-2015 o 10:37, zlotowinfo pisze:
>   $xdate=date("U", mktime(11, 2, 0, date("m"), date("j"), date("y")));
>   echo     "$xdate - ".date('Y-m-d h:m:s',$xdate    ).'<br>';
>   echo "1424296800 - ".date('Y-m-d h:m:s',1424296800);
>
>
> wyświetlone:
> 1424253720 - 2015-02-18 11:02:00
> 1424296800 - 2015-02-18 11:02:00
>
> nie mogę zrozumieć jak zostałą wygenerowana ta druga cyfra
> a wskazuje na tę samą datę i czas
>
>

Sprawdź formatowanie daty. Chciałbyś, aby "m" oznaczało zarówno minuty 
jak i miesiące.

pozdrawiam
-- 
Wojtek Gapiński
http://www.jwmprojekt.pl
Re: data+czas w php
#230924
Author: zlotowinfo
Date: Wed, 18 Feb 2015 11:19
3 lines
1192 bytes
dzięki za naprowadzenie, faktycznie pomotalem
minuty to i, potem jednak trzeba bylo wstawic czas 24h
i wreszcie cyferki mi się zgadzały 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads