mercredi 6 avril 2016

Carbon::now() with time-offset result in different behaviors

I'am using Carbon for manipulating dates in a laravel project.

Carbon::now('+5:30');

Above code is working fine in local environment but not in development environment.

This is what i get on dd(Carbon::now('+5:30'));

1 - IN LOCAL ENVIRONMENT php version - 5.6.3

enter image description here

2 - IN DEVELOPMENT ENVIRONMENT php version - 5.5.9-1ubuntu4.14

enter image description here

But both environment behaves same if i use timezone name instead of time-offset like,

 Carbon::now('Asia/Tokyo');

Is this something about the php-version or something else?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire