Skip to content

Commit

Permalink
Milisecond epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
galpratama committed Oct 2, 2020
1 parent b5a09a3 commit 27887ea
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 19 deletions.
13 changes: 12 additions & 1 deletion .idea/sonarlint/issuestore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 22 additions & 12 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/Models/Food.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ public function toArray()
public function getCreatedAtAttribute($created_at)
{
return Carbon::parse($created_at)
->timestamp;
->getPreciseTimestamp(3);
}
public function getUpdatedAtAttribute($updated_at)
{
return Carbon::parse($updated_at)
->timestamp;
->getPreciseTimestamp(3);
}
public function getPicturePathAttribute()
{
Expand Down
4 changes: 2 additions & 2 deletions app/Models/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public function user()
public function getCreatedAtAttribute($created_at)
{
return Carbon::parse($created_at)
->timestamp;
->getPreciseTimestamp(3);
}
public function getUpdatedAtAttribute($updated_at)
{
return Carbon::parse($updated_at)
->timestamp;
->getPreciseTimestamp(3);
}
}
4 changes: 2 additions & 2 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ class User extends Authenticatable
public function getCreatedAtAttribute($created_at)
{
return Carbon::parse($created_at)
->timestamp;
->getPreciseTimestamp(3);
}
public function getUpdatedAtAttribute($updated_at)
{
return Carbon::parse($updated_at)
->timestamp;
->getPreciseTimestamp(3);
}
}

0 comments on commit 27887ea

Please sign in to comment.