Which of the following statements can be used to set the time zone in individual scripts?
A. date_set_timezone(‘Europe/London’);
B. date_default_timezone_set(‘Europe/London’);
C. date_set_default_timezone(‘Europe/London’);
D. date_default_timezone(‘Europe/London’);
Answer: Option B
Solution(By Examveda Team)
You can also use ini_set(‘date.timezone’, ‘Europe/London’);.Related Questions on Date and Timestamp
A. TRUE
B. FALSE
C. Valid
D. Invalid
The date() function returns ___ representation of the current date and/or time.
A. Integer
B. String
C. Boolean
D. Float
If the format is F then which one of the following will be returned?
A. Complete text representation of month
B. Day of month, with leading zero
C. Daylight saving time
D. Day of month, without zeros
Join The Discussion