Forum und email

Funzioni di Data e Ora

Introduzione

Queste funzioni ti permettono di scaricare la data e l'orario dal server dove gira il PHP. Puoi usare queste funzioni per formattare l'output delle date e degli orari in diversi modi.

Nota: Ricordati che queste funzioni dipendono dai settaggi locali del tuo server. Considera specialmente l'ora legale e gli anni bisestili.

Requisiti

Non sono necessarie librerie esterne per utilizzare questo modulo.

Installazione

Non è necessaria nessuna installazione per usare queste funzioni, esse fanno parte del core di PHP.

Configurazione di Runtime

Questa estensione non definisce alcuna direttiva di configurazione in php.ini

Tipi di risorse

Questa estensione non definisce alcun tipo di risorsa.

Costanti predefinite

Questa estensione non definisce alcuna costante.

Indice dei contenuti

  • checkdate — Verifica una data/orario gragoriana/o
  • date_create — Returns new DateTime object
  • date_date_set — Sets the date
  • date_default_timezone_get — Gets the default timezone used by all date/time functions in a script
  • date_default_timezone_set — Sets the default timezone used by all date/time functions in a script
  • date_format — Returns date formatted according to given format
  • date_isodate_set — Sets the ISO date
  • date_modify — Alters the timestamp
  • date_offset_get — Returns the daylight saving time offset
  • date_parse — Returns associative array with detailed info about given date
  • date_sun_info — Returns an array with information about sunset/sunrise and twilight begin/end
  • date_sunrise — Returns time of sunrise for a given day and location
  • date_sunset — Returns time of sunset for a given day and location
  • date_time_set — Sets the time
  • date_timezone_get — Return time zone relative to given DateTime
  • date_timezone_set — Sets the time zone for the DateTime object
  • date — Formatta una data o orario locale
  • getdate — Riceve informazioni su data/orario
  • gettimeofday — Riceve l'orario attuale
  • gmdate — Formatta una data/ora GMT/UTC
  • gmmktime — Riceve l'UNIX timestamp per una data GMT
  • gmstrftime — Formatta una data/ora GMT/UTC secondo i parametri locali
  • idate — Format a local time/date as integer
  • localtime — Riceve l'orario locale
  • microtime — Restituisce l'attuale UNIX timestamp con i microsecondi
  • mktime — Restituisce la UNIX timestamp per una data
  • strftime — Formatta una data/orario locale accordandola/o alle impostazioni locali according to locale settings
  • strptime — Parse a time/date generated with strftime
  • strtotime — Analizza le descrizioni testuali di datetime in Inglese nell'UNIX timestamp
  • time — Restituisce l'attuale UNIX timestamp
  • timezone_abbreviations_list — Returns associative array containing dst, offset and the timezone name
  • timezone_identifiers_list — Returns numerically index array with all timezone identifiers
  • timezone_name_from_abbr — Returns the timezone name from abbrevation
  • timezone_name_get — Returns the name of the timezone
  • timezone_offset_get — Returns the timezone offset from GMT
  • timezone_open — Returns new DateTimeZone object
  • timezone_transitions_get — Returns all transitions for the timezone