/[drupal]/contributions/sandbox/alex_b/mtk/helper/date.inc
ViewVC logotype

Contents of /contributions/sandbox/alex_b/mtk/helper/date.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Thu Aug 7 17:25:18 2008 UTC (15 months, 2 weeks ago) by alexb
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -0 lines
File MIME type: text/x-php
Add version string.
1 <?php
2 // $Id:$
3
4 /**
5 * GMT time to unix converter.
6 * @todo: check, whether setting tz is necessary.
7 */
8 function mtk_strtotime($date_string) {
9 $tz = date_default_timezone_get();
10 date_default_timezone_set('UTC');
11 if (!$time = strtotime($date_string)) {
12 drupal_set_message(t('Error in time conversion. Date: !date', array('!date' => $date_string)));
13 }
14 date_default_timezone_set($tz);
15 return $time;
16 }

  ViewVC Help
Powered by ViewVC 1.1.2