You're not really explaining what the problem is. Z and UTC are the same timezone. It's Zulu time and a quick Google search would have told you this.
Jan 26, 2024
6
Level 1
Laravel 10x & carbon & PHP 8.2.12 datetime format timezone name diferent servers
Hello
can you help me?
my localhost code:
dd((new \Carbon\Carbon())->format('Y-m-d H:i e'))
output console: 2024-01-26 16:27 UTC
email body text: 2024-01-26 16:27 UTC
my other test server code:
dd((new \Carbon\Carbon())->format('Y-m-d H:i e'))
output console: 2024-01-26 16:27 UTC
email body text: 2024-01-26 16:27 UTC
my prod server code:
dd((new \Carbon\Carbon())->format('Y-m-d H:i e'))
output console: 2024-01-26 16:27 UTC
email body text: 2024-01-26 16:27 Z
why change email body UTC -> Z???
this is net user friendly
Level 1
solved
dd((new \Carbon\Carbon())->format('Y-m-d H:i e')->setTimezone('UTC'))
1 like
Please or to participate in this conversation.