Detect Daylight Saving Time Snippets


22 June, 2014   

To test in other timezones, replace '-5' with your local standard time GMT offset.

Scripts used to calculate Daylight Saving Time (DST) for the US and EU. Valid for years 1900 to 2099. [DST wasn't adopted until the 1950s-1960s for US and 1990s for the EU] By: brad degrandis

23 January, 2013   

Adjusted for daylight saving or standard time as appropriate.

Detect Javascript On/Off, With Notification: If JavaScript is on the user gets a welcome message. If off, the user is instructed to turn it on.

19 February, 2011   

Detect Internet Explorer

PHP code example to get All-Time Number of MySQL Queries

21 January, 2011   

Sometimes the time set on your server isn't accurate to what your local time is. If you can't change it, you can adjust it yourself. If your server thought it was 12 midnight, but it was really 7 pm, this will roll the $today variable back five hours to be correct.

C source code example for using struct tm, time_t, and time to create a simple clock

jQuery example code to add image to browser cache

This will return the number of seconds between now and when the time field was inserted.

By default, Delphi gets its date/time, currency and numeric format from Control Panel's International settings. We can set the constants defined in Delphi, like DecimalSeparator, ShortDateFormat and others like in the code below. To a complete list of these variables, look at Currency and date/time formatting variables in Delphi Help.

14 June, 2015   

This function helps you checking a UNIX timestamp with human readable time formats like 1m, 2d or 4y.

25 January, 2014   

To detect if Aero Glass is enabled we must use the DwmIsCompositionEnabled function.

26 May, 2012   

Helps to find out browser version and type your website visitor is using

30 March, 2011   

Need to people out if they have been inactive for too long? Do it with this piece of code. This takes 3 functions to complete the inactive session task. 1. We need to check if the person is actually logged in using our isLogged function 2. We need the function to check the time the page loaded, and when the last page was loaded 3. We need a...

04 May, 2011   

Need to people out if they have been inactive for too long? Do it with this piece of code. Introduction ----------------------- This takes 3 functions to complete the inactive session task. 1. We need to check if the person is actually logged in using our isLogged function 2. We need the function to check the time the page loaded, and when...

It's an unfortunate necessity that you need to write different code for windows sometimes or at the very least load different libraries since there is no fork(), etc. This is how you can tell.

09 October, 2011   

Example shows how to get the database date and time.

This sql statement enables to detect duplicates entries over a key and creates a seq column which says which one is the sequence of the duplicates. This way you can take only the seq = 1 and still be able to identify all duplicates

Toggle a column bit regardless of state. Useful to change state without doing a query first to detect the state of the bit.