diff options
| author | fisharebest <fisharebest@gmail.com> | 2012-09-14 21:46:56 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2012-09-14 21:46:56 +0000 |
| commit | e2a4517d059ac1522da1073e325e316baed87eba (patch) | |
| tree | 40cf3c2c5a6283e70f3a1acc8301ee79fcb00124 /modules_v3/html | |
| parent | 71ced2f45ce8cabdf1d3340907cf3d82d57c20a6 (diff) | |
| download | webtrees-e2a4517d059ac1522da1073e325e316baed87eba.tar.gz webtrees-e2a4517d059ac1522da1073e325e316baed87eba.tar.bz2 webtrees-e2a4517d059ac1522da1073e325e316baed87eba.zip | |
Assume PHP time is the same as MySQL time. Both should use the same underlying OS function. Saves a DB query.
Only call time() once. For consistency, and for a very minor performance tweak.
Diffstat (limited to 'modules_v3/html')
| -rw-r--r-- | modules_v3/html/module.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules_v3/html/module.php b/modules_v3/html/module.php index 97b1f22bea..26222b087c 100644 --- a/modules_v3/html/module.php +++ b/modules_v3/html/module.php @@ -106,7 +106,7 @@ class html_WT_Module extends WT_Module implements WT_Module_Block { $content = $html; if (get_block_setting($block_id, 'show_timestamp', false)) { - $content.='<br>'.format_timestamp(get_block_setting($block_id, 'timestamp', time())); + $content.='<br>'.format_timestamp(get_block_setting($block_id, 'timestamp', WT_TIMESTAMP)); } if ($template) { @@ -315,7 +315,7 @@ class html_WT_Module extends WT_Module implements WT_Module_Block { echo WT_I18N::translate('Show the date and time of update'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('show_timestamp', $show_timestamp); - echo '<input type="hidden" name="timestamp" value="'.time().'">'; + echo '<input type="hidden" name="timestamp" value="', WT_TIMESTAMP, '">'; echo '</td></tr>'; $languages=get_block_setting($block_id, 'languages'); |
