Difference between revisions of "Time Zone problems on international systems"

From IVS Wiki
Jump to: navigation, search
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
Time zones may need to be set manually in the following two files:
+
{{Article | content =
 +
<div class="floating_card">Time zones may need to be set manually in the following two files.</div>
  
sudo nano /etc/php/<php_ver>/cli/php.ini
+
1. Edit this file by entering the following:
 +
:{{Code Block - Mini | text = sudo nano /etc/<b><php_ver></b>/cli/php.ini}}
  
'''Modify:'''
+
[Date]
 +
; Defines the default timezone used by the date functions
 +
; http://php.net/date.timezone
 +
date.timezone = Asia/Kolkata
  
[Date]
+
<hr>
; Defines the default timezone used by the date functions
 
; http://php.net/date.timezone
 
date.timezone = Asia/Kolkata
 
  
sudo nano /etc/php/<php_ver>/apache2/php.ini
+
2. Edit this file by entering the following:
 +
:{{Code Block - Mini | text = sudo nano /etc/<b><php_ver></b>/apache2/php.ini}}
  
'''Modify:'''
+
[Date]
 +
; Defines the default timezone used by the date functions
 +
; http://php.net/date.timezone
 +
date.timezone = Asia/Kolkata
  
[Date]
+
<hr>
; Defines the default timezone used by the date functions
+
 
; http://php.net/date.timezone
+
3. Restart the apache2 service after making edits by entering the following:
date.timezone = Asia/Kolkata
+
:{{Code Block - Mini | text = sudo service apache2 restart}}
 +
}}

Latest revision as of 12:30, 8 March 2024

Time zones may need to be set manually in the following two files.

1. Edit this file by entering the following:

sudo nano /etc/<php_ver>/cli/php.ini
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Asia/Kolkata

2. Edit this file by entering the following:

sudo nano /etc/<php_ver>/apache2/php.ini
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Asia/Kolkata

3. Restart the apache2 service after making edits by entering the following:

sudo service apache2 restart