Time Calc and Current Date

3 years ago

slavarazum

Code

now()->setTimezone('Europe/Kiev')->subHours(15);
date('Y-m-d')

Output

=> "2021-10-11"
Video course: PHP Package Development