Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $start_time = time()+3600*24; #time zwraca 1413409527
- $departure_timestamp =
- $start_time +
- ($item->departure_day_of_week * 3600*24) -
- (date('N',$start_time)*3600*24) - #date bierze BIEŻĄCY znacznik czasu - 1413409527
- (date('G')*3600) - # jak wyżej
- (date('i')*60) - # j.w
- #kończy się sekunda, zaczyna następna - time() od tej chwili zwraca 1413409528
- date('s') + #date() korzysta z time(), pobiera znacznik czasu 1413409528 - więc do $departure_timestamp dodaje się sekunda więcej niż powinna.
- ($departure_hour_exploded[0]*3600) + ($departure_hour_exploded[1]*60);
- $flight['departure_time'] = date('Y-m-d H:i:s', $departure_timestamp);
Advertisement
Add Comment
Please, Sign In to add comment