Forum und email

Date/Time συναρτήσεις

Εισαγωγή

Αυτές οι συναρτήσεις σας επιστρέπουν να προσδιορίσετε την ημερομηνία και ώρα του server στον οποίο τρέχουν τα PHP scripts σας. Μπορείτε να τις χρησιμοποιείσετε για να παρουσιάσετε την ημερομηνία και ώρα με ποικίλους τρόπους.

Note: Παρακαλείστε να θυμάστε ότι οι συναρτήσεις αυτές εξαρτόνται από τις τοοπικές ρυθμίσεις του server σας. Λάβεται υπόψιν τη θερινή ώρα και τα δίσεκτα έτη καθώς τις χρησιμοποιείτε.

Απαιτήσεις

Δεν χρειάζονται εξωτερικές βιβλιοθήκες για να γίνει build αυτή η επέκταση.

Εγκατάσταση

Δεν χρειάζεται εγκατάσταση για αυτές τις συναρτήσεις, είναι μέρος του πυρήνα της PHP.

Ρυθμίσεις κατά την εκτέλεση

Αυτή η επέκταση δεν έχει directives ρύθμισης ορισμένα στο php.ini.

Τύποι Πόρων

Αυτή η επέκταση δεν έχει resource τύπους ορισμένους.

Προκαθορισμένες Σταθερές

Αυτή η επέκταση δεν έχει σταθερές ορισμένες.

Table of Contents

  • checkdate — Ελέγξτε την εγκυρότητα μίας Γρηγοριανής Ημερομηνίας
  • 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 — Σχηματίστε μία τοπική ώρα/ημερομηνία
  • getdate — Ανάκτηση πληροφοριών για την ημερομηνία/ώρα
  • gettimeofday — Επιστρέφει την τρέχουσα ώρα
  • gmdate — Διαμορφώστε μία GMT/CUT ημερομηνία/ώρα
  • gmmktime — Επιστρέφει το UNIX timestamp για μία GMT ημερομηνία
  • gmstrftime — Διαμορφώνει μία GMT/CUT ώρα/ημερομηνία σύμφωνα με τις τοπικές ρυθμίσεις
  • idate — Format a local time/date as integer
  • localtime — Επιστρέφει την τοπική ώρα
  • microtime — Επιστρέφει το τρέχων UNIX timestamp σε χιλιοστά του δευτερολέπτου
  • mktime — Επιστρέφει το UNIX timestamp για μία δοσμένη ημερομηνία
  • strftime — Διαμορφώνει μια τοπική ώρα/ημερομηνία σύμφωνα με τις τοπικές ρυθμίσεις
  • strptime — Parse a time/date generated with strftime
  • strtotime — Μετατρέψτε σχεδόν οποιαδήποτε ημερομηνία ή ώρα που είναι σε μορφή Αγγλικού κειμένου σε ένα UNIX timestamp
  • time — Επιστρέφει το τρέχων 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