Hướng dẫn wordpress date_default_timezone_set
03/11/2018 08:53 26639 Show Xử lý date time trong wordpress (Handling date time in wordpress)timezone_identifiers_list(): lấy tất cả timezone string date_default_timezone_get():xem thử hiện tại server đang sử dụng default timezone gì date_default_timezone_set(‘America/Los_Angeles’): cấn set default time zone ở đầu file để việc xử lý date time được chính xác
strtotime( ‘2018-11-04 15:03:03’): chuyển dử liệu date time trong mysql về dạng timestamp date(‘Y-m-d H:i:s’,’1541372583′): chuyển từ timestamp về date time trong mysql time():lấy timestamp hiện tại Vòng lặp from date to date trong php
Kết quả:
Tính toán date từ ngày hiện tại
có thể bạn cần xem:
|