-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better timezone handling; use file_put_contents
I run my PHP in a container, which defaults to UTC time; but I want US Eastern time used by the `date()` function when building date-based paths. The way this previously worked was that I set the default timezone **after** I'd used a `date()` function in `config.php`, which resulted in a UTC-based date that was "tomorrow" from my local time zone's perspective. Explicitly setting the timezone in `config.php` first, rather than making this a variable in the `$config` hash does what I want: sets the default timezone as early as possible, and allows all subsequent `date()` invocations to render US Eastern times. This also streamlines the creation of the Markdown files by using `file_put_contents`, which states: ``` This function is identical to calling fopen(), fwrite() and fclose() successively to write data to a file. ```
- Loading branch information
Scott Merrill
committed
May 17, 2018
1 parent
f67682d
commit f6a1ea6
Showing
3 changed files
with
6 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters