Q.1
What is the difference, in seconds, between the current timestamp in the GMT time zone and the current timestamp in your local time zone?
Q.2
You must make a call to ................... to specify what time zone you want calculations to take place in before calling any date functions.
Q.3
What would happen if the following script were run on a Windows server set to Moscow, Russia’s time zone?
<?php
echo gmmktime(0, 0, 0, 1, 1, 1970);
?>
Q.4
The ......... function parses an English textual date or time into a Unix timestamp.
Q.5
................ Formats a local time or date according to locale settings.
Q.6
How many constants does the DateTime class have?
Q.7
Which method is simply an object-oriented version of date()?
Q.8
Which of the following is the right way to use the DateTime class?
Q.9
Which of the following functions do not return a timestamp?
1. time()
2. date()
3. strtotime()
4. localtime()
5. gmmktime()
Q.10
The getdate() function returns
Q.11
Which of the following statements can be used to set the time zone in individual scripts?
Q.12
Among the four PHP DateTimeZone classes given below how many are static? 1. listAbbreviations() 2. getName() 3. getOffset() 4. listIdentifiers()
Q.13
.......... Returns the time of sunrise for a given day / location.
Q.14
What will the following script output?
<?php
$time = strtotime ('2004/01/01');
echo date ('H:i:s', $time);
?>
Q.15
................Checks a date for numeric validity.
Q.16
Among the four PHP DateTimeZone classes given below how many are nonstatic? 1. _construct() 2. getName() 3. getOffset() 4. getTransitions()
Q.17
Which of the following statements can be used to add two months to the existing date?
Q.18
Which method enables you to calculate whether daylight saving time is in force at a specific date and time?
Q.19
How many methods does the DateTime class have?
Q.20
What will be the output of the following PHP code if date is 24/02/2008?
<?php
$date = new DateTime();
echo $date->format('l,F,js,Y')
?>
0 h : 0 m : 1 s