Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

time() + objashnjenje

[es] :: PHP :: time() + objashnjenje

[ Pregleda: 1570 | Odgovora: 8 ]

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

212.194.193.212
Diavoli GG

Član broj: 68353
Poruke: 62
..shall-bg.customer.sbb.co.yu.



Profil

icon time() + objashnjenje03.02.2006. u 22:11

kada napishem

Code:

echo time();


i potom dobijem onaj veliki broj, kako da ga konvertujem u chitljivo vreme :}

i zanima me da li je to vreme "serversko", tachnije kada taj php okachim na server, da li ce pokazivati vreme sa servera ili ce preuzimati vreme od klijenta ??


pozdrav
03.02.2006. u 22:11 

flylord
Ilić Aleksandar
Freedomia (direktor)
Nis/Uzice

Tehnički konsultant
Član broj: 2954
Poruke: 3412
..nis1-nis.customer.sbb.co.yu.

Jabber: flylord@elitesecurity.org
ICQ: 4849714
Sajt: blog.itseminar.org


Profil

icon Re: time() + objashnjenje03.02.2006. u 23:02
http://php.net/date

Code:

date("d/m/Y", time());

03.02.2006. u 23:02 

212.194.193.212
Diavoli GG

Član broj: 68353
Poruke: 62
..shall-bg.customer.sbb.co.yu.



Profil

icon Re: time() + objashnjenje03.02.2006. u 23:17
thx
03.02.2006. u 23:17 

kelja

Član broj: 70429
Poruke: 956
*.70.EUnet.yu.



Profil

icon Re: time() + objashnjenje03.02.2006. u 23:19
print date(" G.i:s", time());

Mada,posto vidim da radis sa flashom ovo mozes dobiti i na mnogo tezi nacin,actionscriptom...Pozdrav
03.02.2006. u 23:19 

oliver78
Oliver Petković
Pančevo

Član broj: 5031
Poruke: 226
*.panet.co.yu.

Sajt: oliver.glogonj.net


Profil

icon Re: time() + objashnjenje04.02.2006. u 00:57
Napravio sam malu klasu za te namene.

TimeStamp

http://oliver.glogonj.net/comment.php?action=show&id=50
04.02.2006. u 00:57 

lowlife
Adam Stanojević
Developer, HSL Srbija
Kragujevac

Član broj: 83604
Poruke: 14
213.137.99.*



Profil

icon Re: time() + objashnjenje04.02.2006. u 01:14
Probaj date sa ovim opisom(iz PHP manuala sa www.w3schools.com - veoma korisno za web) - vreme je ono sa servera - ja sam pitanje klijentskog vremena resavao sa Java Script-om - cini se da je to lako
///////////////////////////////////////////////////////////////////////////
The Date() Function

The date() function is used to format a time or a date.
Syntax

string date (date_format[,int timestamp])

This function returns a string formatted according to the specified format.
Date Formats

The table below shows the characters that may be used in the format string:
Character Description
a "am" or "pm"
A "AM" or "PM"
B Swatch Internet time (000-999)
d Day of the month with a leading zero (01-31)
D Three characters that represents the day of the week (Mon-Sun)
F The full name of the month (January-December)
g The hour in 12-hour format without a leading zero (1-12)
G The hour in 24-hour format without a leading zero (0-23)
h The hour in 12-hour format with a leading zero (01-12)
H The hour in 24-hour format with a leading zero (00-23)
i The minutes with a leading zero (00-59)
I "1" if the date is in daylights savings time, otherwise "0"
j Day of the month without a leading zero (1-31)
l The full name of the day (Monday-Sunday)
L "1" if the year is a leap year, otherwise "0"
m The month as a number, with a leading zero (01-12)
M Three letters that represents the name of the month (Jan-Dec)
n The month as a number without a leading zero (1-12)
O The difference to Greenwich time (GMT) in hours
r An RFC 822 formatted date (e.g. "Tue, 10 Apr 2005 18:34:07 +0300")
s The seconds with a leading zero (00-59)
S The English ordinal suffix for the day of the month (st, nd, rd or th)
t The number of days in the given month (28-31)
T The local time zone (e.g. "GMT")
U The number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)
w The day of the week as a number (0-6, 0=Sunday)
W ISO-8601 week number of year, weeks starting on Monday
Y The year as a 4-digit number (e.g. 2003)
y The year as a 2-digit number (e.g. 03)
z The day of the year as a number (0-366)
Examples

<?php
//Prints something like: Monday
echo date("l");

//Prints something like: Monday 15th of January 2003 05:51:38 AM
echo date("l dS of F Y h:i:s A");

//Prints something like: Monday the 15th
echo date("l \\t\h\e jS");
?>
////////////////////////////////////////////////////////////////
04.02.2006. u 01:14 

nefa
Pozega

Član broj: 79993
Poruke: 23
195.178.58.*

Jabber: neffa@elitesecurity.org
Sajt: iskoristidan.5u.com


Profil

icon Re: time() + objashnjenje04.02.2006. u 01:42
Evo i sa prevodom

- %a - skraceno ime dana u sedmici (npr. "Thu")
- %A - puno ime dana u sedmici (npr. "Thursday")
- %b - skraceno ime meseca (npr. "Dec")
- %B - puno ime meseca (npr. "December")
- %c - standrdno (npr. 11/16/99 19:37:06)
- %d - dan u mesecu bez nule (npr. "9")
- %H - sat u 24-casovnom formatiranju (npr. "18")
- %I - sat u 12-casovnom formatiranju (npr. "05")
- %j - dan od pocetka godine (npr. "096")
- %m - numericki broj meseca (npr. "5")
- %M - minute (npr. "07")
- %p - "am" ili "pm" ("Prepodne" ili "Poslepodne")
- %S - sekunde (npr. "02")
- %U - broj sedmice (1. nedelja je pocetak sedmice npr. "49")
- %W - broj sedmice (1. ponedeljak je pocetak sedmice npr. "49")
- %w - numericki dan sedmice (od "0" za nedelju, do "6" za subotu)
- %x - standard (npr. 11/16/99)
- %X - standard za vreme (npr. 19:37:06)
- %y - 2-cifrena godina (npr. "99")
- %Y - 4-cifrena godina (npr. "1999")
- %Z - oznaka za vrmenesku zonu
- %% - znak za procenat (%)
04.02.2006. u 01:42 

212.194.193.212
Diavoli GG

Član broj: 68353
Poruke: 62
..shall-bg.customer.sbb.co.yu.



Profil

icon Re: time() + objashnjenje04.02.2006. u 13:00
u super ,,. hvala vam svima :}

iskoristio sam print date(" G.i:s", time());

sya


04.02.2006. u 13:00 

Nemanja Avramović
PHP developer, Webinsane
Mladenovac, Srbija

Moderator
Član broj: 32202
Poruke: 3795
195.252.99.*

ICQ: 266136396
Sajt: www.avramovic.info


Profil

icon Re: time() + objashnjenje04.02.2006. u 14:07
Mislim da je lepse sa H:i:s
Moj sajt. Moj blog. Moj avatar. Moj grad. Moja frizura.

[NE PRUŽAM PODRŠKU ZA PHP PREKO PRIVATNIH PORUKA!]
04.02.2006. u 14:07 

[es] :: PHP :: time() + objashnjenje

[ Pregleda: 1570 | Odgovora: 8 ]

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.