Skip to content

Instantly share code, notes, and snippets.

@bayareawebpro
Created July 11, 2017 03:48
Show Gist options
  • Save bayareawebpro/a74380ae3b1db2fe630f590db9d497d7 to your computer and use it in GitHub Desktop.
Save bayareawebpro/a74380ae3b1db2fe630f590db9d497d7 to your computer and use it in GitHub Desktop.
Laravel Timezone Ancestor
<?php
public function getCreatedAtAttribute($value){
return \Carbon\Carbon::createFromTimestampUTC(strtotime($value))->timezone(User::currentUser()->timezone);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment