File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ Provides Laravel-specific and pure PHP helper functions.
4343 - [db_mysql_now](#db_mysql_now)
4444 - [db_mysql_variable](#db_mysql_variable)
4545
46+ - [Date](#date)
47+ - [to_default_timezone](#to_default_timezone)
48+
4649- [Debug](#debug)
4750 - [backtrace_as_string](#backtrace_as_string)
4851 - [minimized_backtrace_as_string](#minimized_backtrace_as_string)
@@ -140,6 +143,18 @@ $hostname = db_mysql_variable('hostname');
140143// localhost
141144` ` `
142145
146+ # # Date
147+
148+ # ### `to_default_timezone()`
149+
150+ Converts passed datetime string to datetime string in Laravel default timezone (` app.timezone` config setting):
151+
152+ ` ` ` php
153+ $date = to_default_timezone(' 2017-02-28T14:05:01Z' );
154+
155+ // 2017-02-28 16:05:01, assuming timezone is Europe/Kiev
156+ ` ` `
157+
143158# # Debug
144159
145160# ### `backtrace_as_string()`
You can’t perform that action at this time.
0 commit comments