100+ results for 'php strtotime'

Not the results you expected?

filing_costs.php (https://bitbucket.org/amitholkar/zenfile-18-05.git) PHP · 198 lines

38

39 ?>

40 <div class="finance_country <?php echo $status ?> custom_accordion" ref="filing_cost_country_<?php echo $invoice->id ?>"><?php echo $invoice->country ?></div>

41

42

96 <input type="hidden" name="additional_fee_id[]" value="<?php echo $additional_fee->additional_fee_id ?>">

97 <?php echo $currency_sign ?><input title="<?php echo $additional_fee->additional_fee_description_by_fa ?>" name="additional_fee_corrected_by_pm[]" value="<?php echo $additional_fee_value ?>" type="text"/>

98 </div>

99 <!-- <div class="finance_input float_left" style="width: 170px;">-->

116 <?php foreach($invoice->invoices as $file) { ?>

117 <a href="<?php echo base_url() ?>cases/download_file/<?php echo $file->file_id ?>"><?php echo $file->filename ?></a>

118 <?php } ?>

121 </div>

122 <div class="float_left">

123 Estimated by PM on <?php echo date('m/d/y' , strtotime($case['estimate_saved_by_pm'])) ?>

124

125 <?php

dkpAward.php (https://github.com/lukas89/WebDKP.git) PHP · 298 lines

1 <?php

2 /*===========================================================

3 CLASS DESCRIPTION

5 Class Description should be placed here.

6 */

7 include_once("dkpUser.php");

8 class dkpAward {

9 /*===========================================================

81 if($row["date"]!="")

82 {

83 $this->dateDate = date("F j, Y", strtotime($row["date"]));

84 $this->dateTime = date("g:i A", strtotime($row["date"]));

date.php (https://gitlab.com/Haithamgit/Project) PHP · 319 lines

24 * @param string $date String representing the datetime, assumed to be UTC (relevant if timezone conversion is used)

25 * @param bool $display_time If true shows date and time, if false only shows date

26 * @param string $date_format Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php)

27 *

28 * @return string

67 * @category Events

68 * @param string $date The date to find the beginning of the day, defaults to today

69 * @param string $format Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php)

70 *

71 * @return string

101 * @category Events

102 * @param string $date The date to find the end of the day, defaults to today

103 * @param string $format Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php)

104 *

105 * @return string

Properties.php (https://github.com/tmccormi/openemr.git) PHP · 629 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Document;

4

5 class Properties

181 $time = (int) $time;

182 } else {

183 $time = strtotime($time);

184 }

185 }

215 $time = (int) $time;

216 } else {

217 $time = strtotime($time);

218 }

219 }

CookieTest.php (https://github.com/nattaphat/hgis.git) PHP · 144 lines

1 <?php

2

3 /*

20 * @author Hugo Hamon <hugo.hamon@sensio.com>

21 */

22 class CookieTest extends \PHPUnit_Framework_TestCase

23 {

24 public function invalidNames()

92 $value = "+1 day";

93 $cookie = new Cookie('foo', 'bar', $value);

94 $expire = strtotime($value);

95

96 $this->assertEquals($expire, $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date');

134 public function testToString()

135 {

136 $cookie = new Cookie('foo', 'bar', strtotime('Fri, 20-May-2011 15:25:52 GMT'), '/', '.myfoodomain.com', true);

137

138 $this->assertEquals('foo=bar; expires=Fri, 20-May-2011 15:25:52 GMT; domain=.myfoodomain.com; secure; httponly', $cookie->__toString(), '->__toString() returns string representation of the cookie');

sale.php (https://gitlab.com/shapcy/opencart) PHP · 438 lines

1 <?php

2 class ModelReportSale extends Model {

3 public function getTotalSales($data = array()) {

56 $order_data = array();

57

58 $date_start = strtotime('-' . date('w') . ' days');

59

60 for ($i = 0; $i < 7; $i++) {

61 $date = date('Y-m-d', $date_start + ($i * 86400));

62

63 $order_data[date('w', strtotime($date))] = array(

64 'day' => date('D', strtotime($date)),

70

71 foreach ($query->rows as $result) {

72 $order_data[date('w', strtotime($result['date_added']))] = array(

73 'day' => date('D', strtotime($result['date_added'])),

MappingInfo.php (https://gitlab.com/cserobiul/BITM-LabMs-New) PHP · 517 lines

1 <?php

2

3 namespace Apps\MappingInfo;

15

16 public function __construct() {

17 if (session_status() == PHP_SESSION_NONE) {

18 session_start();

19 }

51 if (!empty($data['start_date'])) {

52 $originalDate = $data['start_date'];

53 $newDate = date("Y-m-d", strtotime($originalDate));

54 $this->start_date = $newDate;

55 }

57 if (!empty($data['ending_date'])) {

58 $ending_date = $data['ending_date'];

59 $ending_date = date("Y-m-d", strtotime($ending_date));

60 $this->ending_date = $ending_date;

61 }

skip_future_documents_iterator_test.php (https://github.com/markn86/moodle.git) PHP · 250 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

42 */

43 public function test_iterator_all_in_past() {

44 $past = strtotime('2017-11-01');

45 $documents = [

46 self::make_doc($past, 1),

79 */

80 public function test_iterator_some_in_future() {

81 $past = strtotime('2017-11-01');

82 $future = time() + 1000;

83 $documents = [

107 */

108 public function test_iterator_some_false() {

109 $past = strtotime('2017-11-01');

110 $documents = [

111 self::make_doc($past, 1),

customer_online.php (https://bitbucket.org/elena_dyavolova/omf.git) PHP · 143 lines

1 <?php

2 class ControllerReportCustomerOnline extends Controller {

3 public function index() {

91 'url' => $result['url'],

92 'referer' => $result['referer'],

93 'date_added' => date('d/m/Y H:i:s', strtotime($result['date_added'])),

94 'action' => $action

95 );

MockDocumentSource.php (https://github.com/brtriver/sukonv.git) PHP · 151 lines

1 <?php

2 /**

3 * Lithium: the most rad php framework

4 *

5 * @copyright Copyright 2010, Union of RAD (http://union-of-rad.org)

6 * @license http://opensource.org/licenses/bsd-license.php The BSD License

7 */

8

69 },

70 'date' => function($v) {

71 $v = is_numeric($v) ? intval($v) : strtotime($v);

72 return (time() == $v) ? new MongoDate() : new MongoDate($v);

73 },

video.php (https://github.com/dextercowley/joomla-cms.git) PHP · 149 lines

1 <?php

2 /**

3 * @package Joomla.Platform

43 * @param integer $limit The number of objects per page.

44 * @param integer $offset The object's number on the page.

45 * @param string $until A unix timestamp or any date accepted by strtotime.

46 * @param string $since A unix timestamp or any date accepted by strtotime.

94 * @param integer $limit The number of objects per page.

95 * @param integer $offset The object's number on the page.

96 * @param string $until A unix timestamp or any date accepted by strtotime.

97 * @param string $since A unix timestamp or any date accepted by strtotime.

DoctrineDbalSpec.php (https://github.com/Rohea/Gaufrette.git) PHP · 208 lines

1 <?php

2

3 namespace spec\Gaufrette\Adapter;

4

5 //hack - mock php built-in functions

6 require_once 'functions.php';

7

8 use PhpSpec\ObjectBehavior;

9 use Prophecy\Argument;

10

70 array(

71 '"content"' => 'some content',

72 '"mtime"' => strtotime('2012-10-10 23:10:10'),

73 '"checksum"' => '9893532233caff98cd083a116b013c0b',

74 '"key"' => 'filename'

archive.php (https://github.com/sc0ttyd/utils.git) PHP · 170 lines

1 <?php

2 /**

3 * Copyright 2007-2010, Cake Development Corporation (http://cakedc.com)

7 *

8 * @copyright Copyright 2007-2010, Cake Development Corporation (http://cakedc.com)

9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

10 */

11

118 foreach ($elements as $element) {

119 $date = $element[$modelName][$this->dateField];

120 $year = date('Y', strtotime($date));

121 $month = date('m', strtotime($date));

152

153 $startDate = sprintf('%s-%s-%s', $year, $month, $day);

154 if (strtotime($startDate) > time()) {

155 $this->cakeError('error', array(

156 'name' => sprintf(__d('utils', 'No %s found for that date range', true), Inflector::humanize(Inflector::pluralize($this->modelName))),

report.class.php (https://github.com/easysoft/zentaopms.git) PHP · 542 lines

1 <?php

2 class reportTest

3 {

80 $tester->dao->update(TABLE_EXECUTION)->set('`status`')->eq('closed')->where('`id`')->in('101,102,103,107,111,121,151,183')->exec();

81

82 $begin = $begin != 0 ? date('Y-m-d', strtotime(date('Y-m-d') . $begin)) : 0;

83 $end = $end != 0 ? date('Y-m-d', strtotime(date('Y-m-d') . $end)) : 0;

128 public function getBugsTest($begin, $end, $product, $execution)

129 {

130 $begin = date('Y-m-d', strtotime(date('Y-m-d') . $begin));

131 $end = date('Y-m-d', strtotime(date('Y-m-d') . $end));

QueryTest.php (https://github.com/weaverryan/mongodb-odm.git) PHP · 212 lines

1 <?php

2

3 namespace Doctrine\ODM\MongoDB\Tests\Functional;

4

5 require_once __DIR__ . '/../../../../../TestInit.php';

6

7 use Documents\Article,

201 $query = $this->dm->createQuery('Documents\Article');

202 $query->field('createdAt')->range(

203 new \MongoDate(strtotime('1985-09-01 01:00:00')),

204 new \MongoDate(strtotime('1985-09-04'))

RedisTest.php (https://github.com/kiranatama/sagalaya.git) PHP · 395 lines

1 <?php

2 /**

3 * Lithium: the most rad php framework

4 *

5 * @copyright Copyright 2012, Union of RAD (http://union-of-rad.org)

6 * @license http://opensource.org/licenses/bsd-license.php The BSD License

7 */

8

68 $data = 'value';

69 $expiry = '+5 seconds';

70 $time = strtotime($expiry);

71

72 $closure = $this->redis->write($key, $data, $expiry);

90 $data = 'more_data';

91 $expiry = '+1 minute';

92 $time = strtotime($expiry);

93

94 $closure = $this->redis->write($key, $data, $expiry);

sfWidgetFormTime.class.php (https://github.com/coolpink/CpSymfony.git) PHP · 105 lines

1 <?php

2

3 /*

15 * @subpackage widget

16 * @author Fabien Potencier <fabien.potencier@symfony-project.com>

17 * @version SVN: $Id: sfWidgetFormTime.class.php 29674 2010-05-30 12:35:21Z Kris.Wallsmith $

18 */

19 class sfWidgetFormTime extends sfWidgetForm

71 else

72 {

73 $value = ctype_digit($value) ? (integer) $value : strtotime($value);

74 if (false === $value)

75 {

sale_shipping.php (https://github.com/sansanwawa/e-commerse.git) PHP · 188 lines

1 <?php

2 class ControllerReportSaleShipping extends Controller {

3 public function index() {

91 foreach ($results as $result) {

92 $this->data['orders'][] = array(

93 'date_start' => date($this->language->get('date_format_short'), strtotime($result['date_start'])),

94 'date_end' => date($this->language->get('date_format_short'), strtotime($result['date_end'])),

SoftDeleteBehavior.php (https://github.com/bmcclure/CakePHP-Utils-Plugin.git) PHP · 336 lines

1 <?php

2 /**

3 * Copyright 2007-2010, Cake Development Corporation (http://cakedc.com)

7 *

8 * @copyright Copyright 2007-2010, Cake Development Corporation (http://cakedc.com)

9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

10 */

11

204 *

205 * @param object $model

206 * @param mixed $expiration anything parseable by strtotime(), by default '-90 days'

207 * @return integer

208 */

218 *

219 * @param object $model

220 * @param mixed $expiration anything parseable by strtotime(), by default '-90 days'

221 * @return boolean if there were some outdated records

222 */

migrate_plus.migration.beer_user.yml (https://gitlab.com/guillaumev/alkarama) YAML · 105 lines

38

39 # Another new process plugin - callback. This allows us to filter an incoming

40 # source value through an arbitrary PHP function. The function called must

41 # have one required argument.

42 created:

45 # 'yyyy-mm-dd hh:mm:ss', but Drupal wants a UNIX timestamp for 'created'.

46 source: registered

47 callable: strtotime

48

49 # Our source data only has a single timestamp value, 'registered', which we

Array_Helper.php (https://gitlab.com/jeamar1234/medicloud) PHP · 277 lines

1 <?php

2

3 class Array_Helper{

124 $doctorDetail = self::DoctorDetails($findDoctor);

125

126 $findDoctorAvailability = General_Library::FindCurrentDayAvailableTimes(2,$findDoctor->DoctorID,$findWeek,strtotime($currentDate));

127 $doctorHoliday = General_Library::FindPartyFullDayHolidays(2,$findDoctor->DoctorID,$currentDate);

128 (!$doctorHoliday && $findDoctorAvailability) ? $activeDoctorTime = 1 : $activeDoctorTime = 0;

132 $doctorDetail['available_times'] = self::ClinicAvailabilityArray($findDoctorAvailability);

133 $doctorDetail['holidays'] = self::ReturnHolidayArray($doctorDayHolidays);

134 $doctorDetail['existingappointments'] = General_Library::FindAllExistingAppointments($findDoctor->DoctorID, strtotime($currentDate));

135 $doctorlist[] = $doctorDetail;

136 }

146 $doctorDetail = self::DoctorDetails($findDoctor);

147

148 $findDoctorAvailability = General_Library::FindCurrentDayAvailableTimes(2,$findDoctor->DoctorID,$findWeek,strtotime($currentDate));

149 $doctorHoliday = General_Library::FindPartyFullDayHolidays(2,$findDoctor->DoctorID,$currentDate);

150 (!$doctorHoliday && $findDoctorAvailability) ? $activeDoctorTime = 1 : $activeDoctorTime = 0;

sfValidatorDateTest.php (https://github.com/makerlabs/Symfohub.git) PHP · 246 lines

1 <?php

2

3 /*

9 */

10

11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php');

12

13 $t = new lime_test(52);

21 $t->ok($v->clean(null) === null, '->clean() returns null if not required');

22

23 // validate strtotime formats

24 $t->diag('validate strtotime formats');

25 $t->is($v->clean('18 october 2005'), '2005-10-18', '->clean() accepts dates parsable by strtotime');

26 $t->is($v->clean('+1 day'), date('Y-m-d', time() + 86400), '->clean() accepts dates parsable by strtotime');

Etag.php (https://github.com/usagi-project/mynets1.git) PHP · 188 lines

1 <?php

2

3 /**

11

12

13 //20091202 PHP5.3対応のため、eregをpreg_matchに変更

14 //KUNIHARU Tsujioka Usagi Project

15 class Etag

128 // 定義済みの月の名前を数字に変換する

129 $date["year"] = $temp_date[7];

130 } elseif (@strtotime($string_date) > 0) {

131 $date["timestamp"] = strtotime($string_date);

dmFormFilterDoctrine.php (https://github.com/xdade/diem.git) PHP · 228 lines

1 <?php

2

3 abstract class dmFormFilterDoctrine extends sfFormFilterDoctrine

201 $query->andWhere(

202 sprintf('%s.%s >= ?', $this->getRootAlias($query, $fieldName), $fieldName),

203 date('Y-m-d H:i:s', strtotime('-1 day'))

204 );

205 break;

207 $query->andWhere(

208 sprintf('%s.%s >= ?', $this->getRootAlias($query, $fieldName), $fieldName),

209 date('Y-m-d H:i:s', strtotime('-1 week'))

210 );

211 break;

213 $query->andWhere(

214 sprintf('%s.%s >= ?', $this->getRootAlias($query, $fieldName), $fieldName),

215 date('Y-m-d H:i:s', strtotime('-1 month'))

216 );

217 break;

customer.php (https://gitlab.com/hazelnuts23/unitedfoodstuff) PHP · 390 lines

1 <?php

2 class ModelReportCustomer extends Model {

3 public function getTotalCustomersByDay() {

26 $customer_data = array();

27

28 $date_start = strtotime('-' . date('w') . ' days');

29

30 for ($i = 0; $i < 7; $i++) {

31 $date = date('Y-m-d', $date_start + ($i * 86400));

32

33 $order_data[date('w', strtotime($date))] = array(

34 'day' => date('D', strtotime($date)),

40

41 foreach ($query->rows as $result) {

42 $customer_data[date('w', strtotime($result['date_added']))] = array(

43 'day' => date('D', strtotime($result['date_added'])),

login.php (https://gitlab.com/hazelnuts23/unitedfoodstuff) PHP · 111 lines

1 <?php

2 class ControllerCheckoutLogin extends Controller {

3 public function index() {

58 $login_info = $this->model_account_customer->getLoginAttempts($this->request->post['email']);

59

60 if ($login_info && ($login_info['total'] >= $this->config->get('config_login_attempts')) && strtotime('-1 hour') < strtotime($login_info['date_modified'])) {

61 $json['error']['warning'] = $this->language->get('error_attempts');

62 }

VebayController.php (https://gitlab.com/vincent.perdereau/picandparts) PHP · 102 lines

1 <?php

2

3 /**

9 * that is bundled with this package in the file LICENSE.txt.

10 * It is also available through the world-wide-web at this URL:

11 * http://opensource.org/licenses/osl-3.0.php

12 *

13 * @category Ced;

15 * @author CedCommerce Core Team <coreteam@cedcommerce.com>

16 * @copyright Copyright CedCommerce (http://cedcommerce.com/)

17 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

18 */

19 class Ced_CsMarketplace_VebayController extends Ced_CsMarketplace_Controller_AbstractController {

46 }

47

48 $from = strtotime($_REQUEST['DateFrom']);

49 $to = strtotime($_REQUEST['DateTo']);

AdminRepository.php (https://gitlab.com/tetrapak07/vimm-me) PHP · 162 lines

1 <?php namespace App\Repositories\Admin;

2

3 use App\Core\EloquentRepository;

100 $fileThisDel = public_path() . DIRECTORY_SEPARATOR . $filename . '-' . $i . '.' . $format;

101 File::delete($fileThisDel);

102 $contentMain = $contentMain . '<sitemap>' . "\n" . '<loc>' . $domain . '/sitemap-' . $i . '.xml</loc>' . "\n" . '<lastmod>' . date('Y-m-d\TH:i:sP', strtotime($timestamp)) . '</lastmod>' . "\n" . '</sitemap>' . "\n";

103 }

104

ReplacesAttributes.php (https://gitlab.com/madwanz64/laravel) PHP · 508 lines

1 <?php

2

3 namespace Illuminate\Validation\Concerns;

386 protected function replaceBefore($message, $attribute, $rule, $parameters)

387 {

388 if (! strtotime($parameters[0])) {

389 return str_replace(':date', $this->getDisplayableAttribute($parameters[0]), $message);

390 }

review.php (https://github.com/ocStore/ocStore.git) PHP · 447 lines

1 <?php

2 namespace Opencart\Admin\Controller\Catalog;

3 class Review extends \Opencart\System\Engine\Controller {

170 'rating' => $result['rating'],

171 'status' => ($result['status']) ? $this->language->get('text_enabled') : $this->language->get('text_disabled'),

172 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),

173 'edit' => $this->url->link('catalog/review|form', 'user_token=' . $this->session->data['user_token'] . '&review_id=' . $result['review_id'] . $url)

174 ];

monitoring_result.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 394 lines

1 <?php

2 interface CBitrixCloudMonitoring_Access extends Iterator, ArrayAccess

3 {

85 $node->getAttribute("id"),

86 $node->getAttribute("status") == 2? CBitrixCloudMonitoringResult::RED_LAMP: CBitrixCloudMonitoringResult::GREEN_LAMP,

87 strtotime($node->getAttribute("time")),

88 $node->getAttribute("uptime"),

89 $node->textContent()

custom-portfolio-posts.php (https://bitbucket.org/joelkriteman/argento.git) PHP · 140 lines

1 <?php

2

3 // ===== Create the Custom Post Type ===== //

55 7 => __('Portfolio Item Saved.', 'inLEAGUE'),

56 8 => sprintf(__('Portfolio Item Submitted. <a target="_blank" href="%s">Preview Portfolio</a>', 'inLEAGUE'), esc_url( add_query_arg('preview', 'true', get_permalink($post_ID)))),

57 9 => sprintf(__('Portfolio Item Scheduled For: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview Portfolio Item</a>', 'inLEAGUE'), date_i18n( __( 'M j, Y @ G:i', 'inLEAGUE' ), strtotime($post->post_date)), esc_url(get_permalink($post_ID))),

58 10 => sprintf(__('Portfolio Item Draft Updated. <a target="_blank" href="%s">Preview Portfolio</a>', 'inLEAGUE'), esc_url( add_query_arg('preview', 'true', get_permalink($post_ID)))),

59 );

110 <div class="portfolio-extras">

111

112 <?php

113 $website = ($website == '') ? 'http://' : $website;

114 ?>

115

116 <div>

117 <label>Project Link: </label><input name="website" value="<?php echo $website ?>" />

118 </div>

119 </div>

AbstractDateFilter.php (https://gitlab.com/cuza/Clinic_Recods) PHP · 188 lines

1 <?php

2

3 /*

116 $this->applyWhere($queryBuilder, sprintf('%s.%s %s :%s', $alias, $field, '<', $endDateParameterName));

117 if ($this->getOption('input_type') === 'timestamp') {

118 $endValue = strtotime('+1 day', $data['value']);

119 } else {

120 $endValue = clone $data['value'];

PgCacheFlush.php (https://github.com/sharpmachine/wakeupmedia.com.git) PHP · 440 lines

1 <?php

2

3 /**

5 */

6

7 require_once W3TC_LIB_W3_DIR . '/PgCache.php';

8

9 /**

12 class W3_PgCacheFlush extends W3_PgCache {

13 /**

14 * PHP5 Constructor

15 */

16 function __construct() {

19

20 /**

21 * PHP4 Constructor

22 */

23 function W3_PgCacheFlush() {

TraitementMesAnnonces.class.php (https://github.com/Kelzo/projet-sel.git) PHP · 147 lines

1 <?php

2 class TraitementMesAnnonces{

3 function __construct(){

36 //on recupere l'annonce associ

37 $annonce = $qAnnonce->getById($_POST['annonceCibleId']);

38 $notif1->desc=mysql_escape_string("Vous etez interess� par <a href=consulterAnnonce.php?annonce=".$annonce->id.">l'annonce ".$annonce->titre."</a>");

39 $notif1->etat="REPONDU";

40 $notif1->recepteurId=$user->id;

50 $annonce = $qAnnonce->getById($_POST['annonceCibleId']);

51 if($_POST['annonceId']!=-1){

52 $notif2->desc=mysql_escape_string($user->nom." ".$user->prenom." est interess� par <a href=consulterAnnonce.php?annonce=".$annonce->id.">l'annonce ".$annonce->titre."</a> et vous propose <a href='consulterAnnonce.php?annonce=".$_POST['annonceId']."'> l'annonce suivante</a> ainsi que ".$_POST['prix']." grains de poivre en echange.");

53 }else{

54 $notif2->desc=mysql_escape_string($user->nom." ".$user->prenom." est interess par <a href=consulterAnnonce.php?annonce=".$annonce->id.">l'annonce ".$annonce->titre."</a> et vous propose ".$_POST['prix']." grains de poivre en echange.");

86 $annonce = $qAnnonce->getById($_POST['annonceId']);

87 $emetteurAnnonce = $qUser->getById($annonce->utilisateurId);

88 $notif1->desc=mysql_escape_string("Vous avez comment� <a href=consulterAnnonce.php?annonce=".$annonce->id.">l'annonce</a> concernant ".$annonce->desc." propos� par ".$emetteurAnnonce->nom." ".$emetteurAnnonce->prenom);

89 $notif1->etat="REPONDU";

90 $notif1->recepteurId=$user->id;

HttpResponseTest.php (https://gitlab.com/szlongshu/manaphp) PHP · 192 lines

1 <?php

2 /**

3 * Created by PhpStorm.

6 * Time: 21:42

7 */

8 defined('UNIT_TESTS_ROOT') || require __DIR__ . '/bootstrap.php';

9

10 class tResponse extends \ManaPHP\Http\Response

62 date_default_timezone_set('PRC');

63

64 $time = strtotime('2015-12-18 00:12:41');

65

66 $datetime = new DateTime();

69 $this->assertEquals(['Expires' => 'Thu, 17 Dec 2015 16:12:41 GMT'], $response->getHeaders()->toArray());

70

71 $response->setExpires(strtotime('2015-12-18 00:12:42'));

72 $this->assertEquals(['Expires' => 'Thu, 17 Dec 2015 16:12:42 GMT'], $response->getHeaders()->toArray());

73 }

class-mb-custom-taxonomy-register.php (https://gitlab.com/code26/selah) PHP · 235 lines

1 <?php

2 /**

3 * Controls all operations of MB Custom Taxonomy extension for registering custom taxonomy.

202 8 => __( 'Taxonomy submitted.', 'mb-custom-taxonomy' ),

203 // translators: %s: Date and time of the revision.

204 9 => sprintf( __( 'Taxonomy scheduled for: <strong>%s</strong>.', 'mb-custom-taxonomy' ), date_i18n( __( 'M j, Y @ G:i', 'mb-custom-taxonomy' ), strtotime( $post->post_date ) ) ),

205 10 => __( 'Taxonomy draft updated.', 'mb-custom-taxonomy' ),

206 );

DateRangeList.class.php (https://github.com/suquant/soloweb-onphp.git) PHP · 202 lines

1 <?php

2 /***************************************************************************

3 * Copyright (C) 2005-2008 by Konstantin V. Arkhipov, Igor V. Gulyaev *

180

181 if ($lenght > 4) {

182 return new Date(strtotime($date));

183 } elseif ($lenght === 4) {

184 return new Date(

185 strtotime(

186 date('Y-').substr($date, 2).'-'.substr($date, 0, 2)

187 )

188 );

189 } elseif (($lenght == 2) || ($lenght == 1)) {

190 return new Date(strtotime(date('Y-m-').$date));

191 }

192

MediaCommentController.php (https://gitlab.com/makkooz/nikestreetbeat) PHP · 218 lines

1 <?php

2 /**

3 * @link http://www.writesdown.com/

89

90 if ($model->load(Yii::$app->request->post())) {

91 $model->date = date('Y-m-d H:i:s', strtotime($model->date));

92 if ($model->save()) {

93 return $this->redirect(['update', 'id' => $model->id]);

function.date-modify.html (https://github.com/vsilent/vim.git) HTML · 119 lines

9 <div class="next" style="float: right;"><a href="function.date-offset-get.html">date_offset_get</a></div>

10 <div class="up"><a href="ref.datetime.html">Date/Time</a></div>

11 <div class="home"><a href="index.html">PHP Manual</a></div>

12 </div><hr /><div id="function.date-modify" class="refentry">

13 <div class="refnamediv">

59

60 <p class="para">

61 String in a relative format accepted by <a href="function.strtotime.html" class="function">strtotime()</a>.

62 </p>

63 </dd>

106 <p class="para">

107 <ul class="simplelist">

108 <li class="member"><a href="function.strtotime.html" class="function" rel="rdfs-seeAlso">strtotime()</a></li>

109 </ul>

110 </p>

WebController.php (https://gitlab.com/AernBau/robot-battles) PHP · 126 lines

1 <?php

2

3 namespace App\Http\Controllers;

63 if (json_last_error() == JSON_ERROR_NONE) {

64 foreach(json_decode($previous_fights) as $fight){

65 if(strtotime($fight->created_at) > strtotime('-1 day', strtotime(date('Y-m-d H:i:s')))){

66 $fights_in_past_day++;

67 }

registration-times.inc.php (https://gitlab.com/pankajmohale/chef2go) PHP · 113 lines

1 <?php

2 // @codingStandardsIgnoreFile

3 /**

77 if(is_object($user) && !empty($user->ID) && ($user_id = $user->ID) && $user->user_registered)

78 {

79 return apply_filters("ws_plugin__s2member_registration_time", strtotime($user->user_registered), get_defined_vars());

80 }

81 else // Else we return a default value of 0, because there is insufficient data.

user_model.old.php (https://github.com/mkhairul/Presta.git) PHP · 307 lines

1 <?php

2 class User_model extends Model {

3

104 'password' => $password,

105 'email' => 'admin@myprojectlog.com',

106 'timecreated' => strtotime('now')

107 );

108 $this->db->insert($this->table_name, $data);

posts.php (https://gitlab.com/Ltaimao/wecenter) PHP · 514 lines

1 <?php

2 /*

3 +--------------------------------------------------------------------------

217 if ($day)

218 {

219 $add_time = strtotime('-' . $day . ' Day');

220 }

221

RedisTest.php (https://github.com/niel/lithium.git) PHP · 395 lines

1 <?php

2 /**

3 * Lithium: the most rad php framework

4 *

5 * @copyright Copyright 2011, Union of RAD (http://union-of-rad.org)

6 * @license http://opensource.org/licenses/bsd-license.php The BSD License

7 */

8

68 $data = 'value';

69 $expiry = '+5 seconds';

70 $time = strtotime($expiry);

71

72 $closure = $this->redis->write($key, $data, $expiry);

90 $data = 'more_data';

91 $expiry = '+1 minute';

92 $time = strtotime($expiry);

93

94 $closure = $this->redis->write($key, $data, $expiry);

return.php (https://gitlab.com/shapcy/opencart) PHP · 238 lines

1 <?php

2 class ModelSaleReturn extends Model {

3 public function addReturn($data) {

181

182 $message = $this->language->get('text_return_id') . ' ' . $return_id . "\n";

183 $message .= $this->language->get('text_date_added') . ' ' . date($this->language->get('date_format_short'), strtotime($return_query->row['date_added'])) . "\n\n";

184 $message .= $this->language->get('text_return_status') . "\n";

185 $message .= $return_query->row['status'] . "\n\n";

fireeagle.php (https://github.com/nemein/openpsa.git) PHP · 145 lines

1 <?php

2 /**

3 * @package org.routamc.positioning

39 $position = array();

40

41 require_once(MIDCOM_ROOT . '/external/fireeagle.php');

42

43 $fireeagle = new FireEagle($this->_config->get('fireeagle_consumer_key'), $this->_config->get('fireeagle_consumer_secret'), $fireeagle_access_key, $fireeagle_access_secret);

44

45 // Note: this must be C so we get floats correctly from JSON. See http://bugs.php.net/bug.php?id=41403

46 setlocale(LC_NUMERIC, 'C');

47

75 $position['longitude'] = $best_position->longitude;

76

77 $position['date'] = strtotime($best_position->located_at);

78

79 return $position;

Greenbone.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 151 lines

1 <?php

2 /**

3 * Copyright (c) 2012 Endeavor Systems, Inc.

110 $findingInstance['uploadId'] = (int) $uploadId;

111 $discoveredDate = new Zend_Date(

112 strtotime($scanDate),

113 Zend_Date::TIMESTAMP

114 );

Vote.php (https://bitbucket.org/brainbox/shared.git) PHP · 270 lines

1 <?php

2

3

245

246 //Find Next Tuesday

247 $startDate = date('Y-m-d', strtotime('next Tuesday') );

248 $endDate = date('Y-m-d', strtotime('third Tuesday') );

shippings.php (https://gitlab.com/bandana/Astro-Veda) PHP · 408 lines

1 <?php

2

3 class Shippings extends BaseController {

60 'type' => $shipping->type,

61 'total_cost' => $quotation->total_cost,

62 'date' => date("Y-m-d H:i:s", strtotime($quotation->date)),

63 'object_cost' => $quotation->object_cost,

64 'shipping_cost' => $quotation->shipping_cost,

167 'type' => $quotation->shipping->type,

168 'total_cost' => $quotation->total_cost,

169 'date' => date("Y-m-d H:i:s", strtotime($quotation->date)),

170 'object_cost' => $quotation->object_cost,

171 'shipping_cost' => $quotation->shipping_cost,

SubtaskTimeTrackingTest.php (https://gitlab.com/x33n/kanboard) PHP · 314 lines

261

262 // Slot start before and finish inside the calendar time range

263 $this->container['db']->table(SubtaskTimeTracking::TABLE)->insert(array('user_id' => 1, 'subtask_id' => 1, 'start' => strtotime('-1 day'), 'end' => strtotime('+1 hour')));

264

265 // Slot start inside time range and finish after the time range

266 $this->container['db']->table(SubtaskTimeTracking::TABLE)->insert(array('user_id' => 1, 'subtask_id' => 2, 'start' => strtotime('+1 hour'), 'end' => strtotime('+2 days')));

267

268 // Start before time range and finish inside time range

273

274 // Start and finish after the time range

275 $this->container['db']->table(SubtaskTimeTracking::TABLE)->insert(array('user_id' => 1, 'subtask_id' => 5, 'start' => strtotime('+2 days'), 'end' => strtotime('+3 days')));

276

277 // Start and finish before the time range

calendar.php (https://gitlab.com/x33n/ProjectPier-Core) PHP · 178 lines

18 ?>

19 <div class="calendar">

20 <h2><?php echo clean(lang(sprintf('month %u', $month))); ?> <?php echo $year; ?></h2>

21 <?php

76 }

77 ?>

78 <th class="<?php echo $dow_class; ?>"><?php echo clean(lang(sprintf('weekday short %u', $dow ))); ?></th>

79 <?php

113 <td class="<?php echo $dow_class; ?>">

114 <div class="date"><?php echo $dom; ?></div>

115 <?php

175 <div class="prev-month"><a href="<?php echo get_url('milestone', 'calendar', gmdate('Ym', $prevMonth)); ?>"><?php echo clean(lang(sprintf('month %u', gmdate('m', $prevMonth)))); ?> <?php echo gmdate('Y', $prevMonth); ?></a></div>

176 <div class="next-month"><a href="<?php echo get_url('milestone', 'calendar', gmdate('Ym', $nextMonth)); ?>"><?php echo clean(lang(sprintf('month %u', gmdate('m', $nextMonth)))); ?> <?php echo gmdate('Y', $nextMonth); ?></a></div>

177 </div>

178 </div>

radar_axis_test.php (https://github.com/F5/zetacomponents.git) PHP · 212 lines

1 <?php

2 /**

3 * ezcGraphRadarChartAxisTest

26 */

27

28 require_once dirname( __FILE__ ) . '/test_case.php';

29

30 /**

42 public static function suite()

43 {

44 return new PHPUnit_Framework_TestSuite( "ezcGraphRadarChartAxisTest" );

45 }

46

65

66 $chart = new ezcGraphRadarChart();

67 $chart->palette = new ezcGraphPaletteEzBlue();

68 $chart->legend = false;

69 $chart->data['sample'] = new ezcGraphArrayDataSet( $this->getRandomData( 13 ) );

class-wc-email-customer-completed-order.php (https://gitlab.com/hunt9310/ras) PHP · 191 lines

1 <?php

2

3 if ( ! defined( 'ABSPATH' ) ) {

33 $this->subject = __( 'Your {site_title} order from {order_date} is complete', 'woocommerce' );

34

35 $this->template_html = 'emails/customer-completed-order.php';

36 $this->template_plain = 'emails/plain/customer-completed-order.php';

61 $this->find['order-number'] = '{order_number}';

62

63 $this->replace['order-date'] = date_i18n( wc_date_format(), strtotime( $this->object->order_date ) );

64 $this->replace['order-number'] = $this->object->get_order_number();

65 }

ArticleDetail.php (https://gitlab.com/ntphuc/BackendFeedy) PHP · 337 lines

1 <?php

2

3 namespace App\Http\Controllers\TraitController;

136 $datetime_publish = date('Y-m-d H:i', strtotime(\Input::get('publish_date') . ' ' . \Input::get('publish_time')));

137 $time_delay = (strtotime($datetime_publish) - strtotime(date('Y-m-d H:i')));

138 if ($time_delay >= 0) {

139 $this->dispatch((new ReleaseContent($article->id))->delay($time_delay));

272 $meta_insert->meta_key = 'review_' . $k;

273 if ($k == 'ingredients' || $k == 'directions') {

274 $meta_insert->meta_value = str_replace(PHP_EOL, '<br>', $v);

275 } else {

276 $meta_insert->meta_value = $v;

284 $datetime_publish = date('Y-m-d H:i', strtotime(\Input::get('publish_date') . ' ' . \Input::get('publish_time')));

285 $time_delay = (strtotime($datetime_publish) - strtotime(date('Y-m-d H:i')));

286 if ($time_delay >= 0) {

287 $this->dispatch((new ReleaseContent($article->id))->delay($time_delay));

font_binary_stream.cls.php (https://bitbucket.org/fusioninvoice_it/fusioninvoice.git) PHP · 339 lines

1 <?php

2 /**

3 * @package php-font-lib

4 * @link http://php-font-lib.googlecode.com/

5 * @author Fabien Mnager <fabien.menager@gmail.com>

6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License

7 * @version $Id: font_binary_stream.cls.php 42 2012-02-05 10:49:20Z fabien.menager $

8 */

9

11 * Generic font file binary stream.

12 *

13 * @package php-font-lib

14 */

15 class Font_Binary_Stream {

banners.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 218 lines

1 <?php

2 /**

3 * @package Joomla.Administrator

31 JHtmlSidebar::addEntry(

32 JText::_('COM_BANNERS_SUBMENU_BANNERS'),

33 'index.php?option=com_banners&view=banners',

34 $vName == 'banners'

35 );

37 JHtmlSidebar::addEntry(

38 JText::_('COM_BANNERS_SUBMENU_CATEGORIES'),

39 'index.php?option=com_categories&extension=com_banners',

40 $vName == 'categories'

41 );

49 JHtmlSidebar::addEntry(

50 JText::_('COM_BANNERS_SUBMENU_CLIENTS'),

51 'index.php?option=com_banners&view=clients',

52 $vName == 'clients'

53 );

SetCookie.php (https://gitlab.com/wuhang2003/rainloop-webmail) PHP · 410 lines

1 <?php

2

3 namespace GuzzleHttp\Cookie;

248 $this->data['Expires'] = is_numeric($timestamp)

249 ? (int) $timestamp

250 : strtotime($timestamp);

251

252 return $this;

DataSQLBuilder.php (https://github.com/frhumanes/PLM.git) PHP · 264 lines

1 <?php

2

3 /*

4 * $Id: DataSQLBuilder.php 1262 2009-10-26 20:54:39Z francois $

5 *

6 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

18 * This software consists of voluntary contributions made by many individuals

19 * and is licensed under the LGPL. For more information please see

20 * <http://propel.phpdb.org>.

21 */

22

23 require_once 'propel/engine/builder/DataModelBuilder.php';

24 require_once 'propel/engine/database/model/PropelTypes.php';

class-wc-report-taxes-by-date.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 264 lines

33 <a

34 href="#"

35 download="report-<?php echo esc_attr( $current_range ); ?>-<?php echo date_i18n( 'Y-m-d', current_time( 'timestamp' ) ); ?>.csv"

36 class="export_csv"

37 data-export="table"

212 <th class="total_row"><?php _e( 'Number of orders', 'woocommerce' ); ?></th>

213 <th class="total_row"><?php _e( 'Total sales', 'woocommerce' ); ?> <?php echo wc_help_tip( __( "This is the sum of the 'Order total' field within your orders.", 'woocommerce' ) ); ?></th>

214 <th class="total_row"><?php _e( 'Total shipping', 'woocommerce' ); ?> <?php echo wc_help_tip( __( "This is the sum of the 'Shipping total' field within your orders.", 'woocommerce' ) ); ?></th>

215 <th class="total_row"><?php _e( 'Total tax', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the total tax for the rate (shipping tax + product tax).', 'woocommerce' ) ); ?></th>

216 <th class="total_row"><?php _e( 'Net profit', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Total sales minus shipping and tax.', 'woocommerce' ) ); ?></th>

217 </tr>

218 </thead>

226 <tr>

227 <th scope="row">

228 <?php echo ( 'month' === $this->chart_groupby ) ? date_i18n( 'F', strtotime( $date . '01' ) ) : date_i18n( get_option( 'date_format' ), strtotime( $date ) ); ?>

229 </th>

230 <td class="total_row"><?php echo $tax_row->total_orders; ?></td>

Elementrecueilli.php (https://gitlab.com/team_fsn/fsn-php) PHP · 382 lines

1 <?php

2

3 class Form_Elementrecueilli extends Yab_Form {

146 'label' => $i18n->say('datedecouverte'),

147 'class' => 'datepicker',

148 'value' => $elementrecueilli->has('datedecouverte') ? date('d/m/Y', strtotime($elementrecueilli->get('datedecouverte'))) : date('d/m/Y'),

149 'validators' => array(),

150 'errors' => array(),

reports.php (https://github.com/lutherj/Ushahidi_Web.git) PHP · 109 lines

8 echo $report_stats;

9 ?>

10 <h1><?php echo Kohana::lang('ui_main.reports').": ";?> <?php echo ($category_title) ? " in $category_title" : ""?> <?php echo $pagination_stats; ?></h1>

11 <div style="clear:both;"></div>

12 <div class="r_cat_tooltip"> <a href="#" class="r-3">2a. Structures a risque | Structures at risk</a> </div>

80 {

81 ?>

82 <a class="r_category" href="<?php echo url::site(); ?>reports/?c=<?php echo $category->id; ?>"><span class="r_cat-box"><img src="<?php echo url::base().Kohana::config('upload.relative_directory')."/".$category->category_image_thumb; ?>" height="16" width="16" /></span> <span class="r_cat-desc"><?php echo $localized_categories[(string)$category->category_title];?></span></a>

83 <?php

86 {

87 ?>

88 <a class="r_category" href="<?php echo url::site(); ?>reports/?c=<?php echo $category->id; ?>"><span class="r_cat-box" style="background-color:#<?php echo $category->category_color;?>;"></span> <span class="r_cat-desc"><?php echo $localized_categories[(string)$category->category_title];?></span></a>

89 <?php

95

96 <div class="r_details">

97 <h3><a class="r_title" href="<?php echo url::site(); ?>reports/view/<?php echo $incident_id; ?>"><?php echo $incident_title; ?></a> <a href="<?php echo url::site(); ?>reports/view/<?php echo $incident_id; ?>#discussion" class="r_comments"><?php echo $comment_count; ?></a> <?php echo $incident_verified; ?></h3>

98 <p class="r_date r-3 bottom-cap"><?php echo $incident_date; ?></p>

PKPReviewAssignment.inc.php (https://github.com/ojsde/pkp-lib.git) PHP · 673 lines

1 <?php

2

3 /**

4 * @file classes/submission/reviewAssignment/PKPReviewAssignment.inc.php

5 *

6 * Copyright (c) 2000-2012 John Willinsky

647 $dateDue = $this->getDateDue();

648 if ($dateDue === null) return null;

649 return round((strtotime($dateDue) - time()) / (86400 * 7.0));

650 }

651

register-in.inc.php (https://gitlab.com/Gashler/dp) PHP · 104 lines

1 <?php

2 /**

3 * Registration Links (inner processing routines).

52 if (count ($register) === 6 && $register[0] === "subscr_gateway_subscr_id_custom_item_number_time" /* Does the checksum value match up here? */)

53 {

54 if (is_numeric ($register[5]) && $register[5] <= strtotime ("now") && $register[5] >= strtotime ("-" . apply_filters ("ws_plugin__s2member_register_link_exp_time", "2 days", get_defined_vars ())))

55 {

56 $_COOKIE["s2member_subscr_gateway"] = /* For ``reg_cookies_ok ()``. */ c_ws_plugin__s2member_utils_encryption::encrypt ($register[1]);

RCCWP_Post.php (https://gitlab.com/endomorphosis/reservationtelco) PHP · 201 lines

1 <?php

2 /**

3 * When a posts is saved this class is called for check if exists a write panel with custom fields

137 if( isset( $_REQUEST['rc_cwp_meta_date'])){

138 foreach( $_REQUEST['rc_cwp_meta_date'] as $meta_name ) {

139 $metaDate = strtotime($_POST[$meta_name]);

140 $formatted_date = date('Y-m-d',$metaDate);

141 $_POST[$meta_name] = $formatted_date;

183 $customWritePanel = FALSE;

184 if (isset($customWritePanelId)) {

185 include_once('RCCWP_Application.php');

186 $customWritePanel = RCCWP_CustomWritePanel::Get($customWritePanelId);

187 }

DateTime.php (https://gitlab.com/fiesta-framework/Documentation) PHP · 228 lines

1 <?php

2

3 namespace Faker\Provider;

17 }

18

19 return strtotime(empty($max) ? 'now' : $max);

20 }

21

93 /**

94 * Get a DateTime object based on a random date between two given dates.

95 * Accepts date strings that can be recognized by strtotime().

96 *

97 * @param string $startDate Defaults to 30 years ago

102 public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now')

103 {

104 $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate);

105 $endTimestamp = static::getMaxTimestamp($endDate);

106

Base.php (https://github.com/sgtcarneiro/horde.git) PHP · 386 lines

1 <?php

2

3 require_once dirname(__FILE__) . '/Autoload.php';

320 // creation of tags that don't yet exist in the test database.

321 for ($i = 1; $i <= 100; $i++) {

322 self::$tagger->tag(1, 1, "t$i", new Horde_Date(strtotime('now - ' . $i . ' minutes')));

323 }

324

343 // most recently, and so on.

344 for ($i = 1; $i <= 100; $i++) {

345 self::$tagger->tag(1, $i, 1, new Horde_Date(strtotime('now - ' . $i . ' minutes')));

346 }

347

366 // most recently, and so on.

367 for ($i = 1; $i <= 100; $i++) {

368 self::$tagger->tag($i, 1, 1, new Horde_Date(strtotime('now - ' . $i . ' minutes')));

369 }

370

index.php (https://bitbucket.org/ben-hudson/wci-schedule.git) PHP · 159 lines

6 <title>WCI Schedule</title>

7 <script type="text/javascript">

8 setTimeout(function() {location = 'http://wcischeduleapp.com/app/index.php'}, 60000)

9 </script>

10 </head>

11 <body style="font-family: sans-serif; text-align:center">

12 <img style="display:block; margin-left:auto; margin-right:auto; width:12%; height:12%" src="http://wcischeduleapp.com/app/icon.png"></img>

13 <?php

14 function format_time($minutes)

15 {

50 if ($result = mysqli_query($link, "SELECT * FROM header ORDER BY id LIMIT 1")) {

51 while ($row = mysqli_fetch_row($result)) {

52 $starts = strtotime($row[3]);

53 $ends = strtotime($row[4]);

68 $type = $row[1];

69 $count = (bool) $row[2];

70 $date = strtotime($row[3]);

71

72 if ($today < $date) {

safety_stock.php (https://github.com/jonlord1012/srmis.git) PHP · 201 lines

1 <?php

2

3 $query = mysql_query ("SELECT * FROM ms_barang");

32 if ($r_spb)

33 {

34 $pesan = strtotime($r_spb['created_datetime']);

35 $diterima = strtotime($r_spb['update_datetime']);

82 if ($r_spb)

83 {

84 $pesan = strtotime($r_spb['created_datetime']);

85

86 $diterima = strtotime($r_spb['update_datetime']);

incident.php (https://bitbucket.org/mslepko/jdi-task.git) PHP · 141 lines

1 <?php

2 $post=$error=array();

3

6 unset($_POST);

7 $post = array_map('trim',$post);

8 if(empty($post['incident_date']) || (date('Y/m/d H:i', strtotime($post['incident_date'])) != $post['incident_date']))

9 $error['incident_date'] = 'The given date is invalid';

10 if(empty($post['resolution_date']) || (date('Y/m/d H:i', strtotime($post['resolution_date'])) != $post['resolution_date']))

class-ai1ec-agenda-widget.php (https://gitlab.com/Blueprint-Marketing/interoccupy.net) PHP · 278 lines

1 <?php

2

3 /**

90 }

91

92 $ai1ec_view_helper->display_admin( 'agenda-widget-form.php', $fields );

93 }

94

226 if ( $seek_days ) {

227 $seek_count = $instance['days_per_page'] * 5;

228 $last_day = strtotime(

229 '+' . $instance['days_per_page'] . ' days'

230 );

256 $args['subscribe_url'] = AI1EC_EXPORT_URL . $subscribe_filter;

257

258 $ai1ec_view_helper->display_theme( 'agenda-widget.php', $args );

259 }

260

pay_hour.php (https://github.com/karlom/gameadmin.git) PHP · 166 lines

1 <?php

2 /*

3 * Author:linruirong

8 include_once '../../../protected/config/config.php';

9 include_once SYSDIR_ADMIN_INCLUDE . '/global.php';

10 global $lang;

11

12 //时间

13 $startDay = strtotime($_POST['startDay']);

14 $endDay = strtotime($_POST['endDay']);

15 $startDay = $startDay ? $startDay : strtotime(date('Y-m-d',strtotime('-6day')));

16 $endDay = $endDay ? $endDay : strtotime(date('Y-m-d'));

22 $dateStart = (strtotime($dateStart) >= strtotime(ONLINEDATE)) ? $dateStart : ONLINEDATE;

23 $diffDay = abs(strtotime($dateStart) - strtotime($dateEnd))/(3600*24) + 1 ;

24 $startStamp = strtotime($dateStart);

Cookie.php (https://bitbucket.org/cesarmedrano/cesarmedrano.git) PHP · 525 lines

1 <?php

2

3 namespace Guzzle\Plugin\Cookie;

69 $this->setExpires(time() + (int) $this->getMaxAge());

70 } elseif ($this->getExpires() && !is_numeric($this->getExpires())) {

71 $this->setExpires(strtotime($this->getExpires()));

72 }

73 }

events.php (https://github.com/livinglab/openlab.git) PHP · 608 lines

1 <?php

2 /**

3 * Events Collection

512 $y = intval( $year );

513 $w = absint( $week );

514 $m = date( 'n', strtotime( strval( $y ) . '-W' . strval( $w ) ) );

515 $month_dt = Carbon::createFromDate( $y, $m, 2, $this->timezone );

516 $days = array();

HttpCacheListenerTest.php (https://gitlab.com/Isaki/le331.fr) PHP · 259 lines

1 <?php

2

3 /*

19 use Sensio\Bundle\FrameworkExtraBundle\EventListener\HttpCacheListener;

20

21 class HttpCacheListenerTest extends \PHPUnit_Framework_TestCase

22 {

23 public function setUp()

132 }

133

134 public function testCacheMaxAgeSupportsStrtotimeFormat()

135 {

136 $this->request->attributes->set('_cache', new Cache(array(

TimeEntryDaoTestCase.php (https://bitbucket.org/volatileeight/prado.git) PHP · 213 lines

1 <?php

2

3 require_once(dirname(__FILE__).'/BaseTestCase.php');

28 $project->CreatorUserName = "admin";

29 $project->DateCreated = time();

30 $project->CompletionDate = strtotime('+1 month');

31 $project->Description = 'Test project 1';

32 $project->EstimateDuration = 100.5;

42 $project->CreatorUserName = "manager";

43 $project->DateCreated = time();

44 $project->CompletionDate = strtotime('+1 week');

45 $project->Description = 'Test project 2';

46 $project->EstimateDuration = 30.5;

126 $entry->Duration = 1.5;

127 $entry->Project = $added[0];

128 $entry->ReportDate = strtotime('-1 day');

129 $entry->Username = 'consultant';

130

Date.php (https://gitlab.com/geeta7/drupal) PHP · 191 lines

1 <?php

2

3 /**

86

87 if ($operators[$operator]['values'] == 1) {

88 $convert = strtotime($value['value']);

89 if (!empty($form['value']) && ($convert == -1 || $convert === FALSE)) {

90 $form_state->setError($form['value'], $this->t('Invalid date format.'));

92 }

93 elseif ($operators[$operator]['values'] == 2) {

94 $min = strtotime($value['min']);

95 if ($min == -1 || $min === FALSE) {

96 $form_state->setError($form['min'], $this->t('Invalid date format.'));

97 }

98 $max = strtotime($value['max']);

99 if ($max == -1 || $max === FALSE) {

100 $form_state->setError($form['max'], $this->t('Invalid date format.'));

EmployeePunchInAPI.php (https://github.com/orangehrm/OrangeHRM.git) PHP · 136 lines

1 <?php

2

3 /**

74

75 //check overlapping

76 $punchInUtcTime = date('Y-m-d H:i', strtotime($dateTime) - $timeZoneOffset * 3600);

77 $editable = $this->getAttendanceService()->getPunchTimeUserConfiguration();

78 if (!$editable) {

79 $utcNowTimeValue = strtotime($this->getCurrentUTCTime());

80 $userEnterTimeUTCValue = strtotime($punchInUtcTime);

Controller.php (https://github.com/87central/GUS.git) PHP · 158 lines

1 <?php

2 /**

3 * Controller is the customized base controller class.

138 public function getMessages(){

139 $userID = Yii::app()->user->id;

140 $fromDate = strtotime('yesterday');

141 $toDate = strtotime('+1 week');

function.html_select_time.php (https://gitlab.com/staging06/myproject) PHP · 364 lines

1 <?php

2 /**

3 * Smarty plugin

10 * @ignore

11 */

12 require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');

13 /**

14 * @ignore

15 */

16 require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');

17

18 /**

22 * Purpose: Prints the dropdowns for time selection

23 *

24 * @link http://www.smarty.net/manual/en/language.function.html.select.time.php {html_select_time}

25 * (Smarty online manual)

26 * @author Roberto Berto <roberto@berto.net>

table_sort.class.php (https://bitbucket.org/frchico/chamilo_openshift.git) PHP · 266 lines

1 <?php

2 /* For licensing terms, see /license.txt */

3 /**

61 break;

62 case SORT_DATE:

63 $compare_function = 'return strtotime(strip_tags($a['.$column.'])) '.$compare_operator.' strtotime(strip_tags($b['.$column.']));';

64 break;

65 case SORT_STRING:

169 break;

170 case SORT_DATE:

171 $compare_function = 'return strtotime(strip_tags($a['.$column.'])) '.$compare_operator.' strtotime(strip_tags($b['.$column.']));';

172 break;

173 case SORT_STRING:

231 foreach ($data as $index => & $row) {

232 if (strlen(strip_tags($row[$column])) != 0) {

233 $check_date = strtotime(strip_tags($row[$column]));

234 // strtotime Returns a timestamp on success, FALSE otherwise.

sale_order.php (https://bitbucket.org/elena_dyavolova/omf.git) PHP · 190 lines

1 <?php

2 class ControllerReportSaleOrder extends Controller {

3 public function index() {

9 $filter_date_start = $this->request->get['filter_date_start'];

10 } else {

11 $filter_date_start = date('Y-m-d', strtotime(date('Y') . '-' . date('m') . '-01'));

12 }

13

91 foreach ($results as $result) {

92 $this->data['orders'][] = array(

93 'date_start' => date($this->language->get('date_format_short'), strtotime($result['date_start'])),

94 'date_end' => date($this->language->get('date_format_short'), strtotime($result['date_end'])),

functions.php (https://github.com/BenBE/ispCP.git) PHP · 246 lines

1 <?php

2

3 include_once(SM_PATH . 'functions/i18n.php');

4 include_once(SM_PATH . 'plugins/show_user_and_ip/config.php');

5

6 function sui_last_load()

232 if ( !isset($_SESSION["sui_last_date_saved"]) || $_SESSION["sui_last_date_saved"] != "1" )

233 {

234 $sui_last_date = strtotime("now");

235 setPref($data_dir, $username, "sui_last_ip", $_SERVER['REMOTE_ADDR']);

236 $sui_remote_host = gethostbyaddr($_SERVER['REMOTE_ADDR']);

Entity.php (https://gitlab.com/nitm/yii2-module) PHP · 175 lines

1 <?php

2

3 namespace nitm\models;

137 if ($event->sender->hasAttribute($dateAttribute)) {

138 $attribute = '%'.\nitm\helpers\ClassHelper::variableName($dateAttribute).'%';

139 $date = $event->sender->$dateAttribute instanceof \yii\db\Expression ? strtotime('now') : $event->sender->$dateAttribute;

140 $options['variables'][$attribute] = \Yii::$app->formatter->asDatetime(strtotime($date));

View.php (https://bitbucket.org/acidel/buykoala.git) PHP · 204 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Adminhtml

23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

126 $log = $this->getCustomerLog();

127 if ($log->getLogoutAt() ||

128 strtotime(now())-strtotime($log->getLastVisitAt())>Mage_Log_Model_Visitor::getOnlineMinutesInterval()*60) {

129 return Mage::helper('customer')->__('Offline');

130 }

backupTenant.php (https://github.com/ciniki/core.git) PHP · 186 lines

1 <?php

2 //

3 // Description

139 // Note: Due to sshfs mount problems at rackspace, the following code was added to create backups on local storage and then copy via sftp.

140 // In ciniki-api.ini setup final_backup_dir = ssh2.sftp://user:pass@ftpserver:22/fullpathtobackups

141 // Must have libssh2-php installed as a package on server

142 //

143 if( isset($final_backup_dir) ) {

162 $dh = opendir($zip_backup_dir);

163 $today = date('Ymd');

164 $today_datetime = strtotime($today);

165 while( ($file = readdir($dh)) !== false ) {

166 if( $file == "backup-$cur_date.zip" ) {

174 }

175 if( preg_match("/backup-([0-9]+)-([0-9]+)/", $file, $matches) ) {

176 $file_date = strtotime($matches[1]);

177 if( ($today_datetime - $file_date) > 86000 ) {

178 unlink($zip_backup_dir . '/' . $file);

AmazonS3.php (https://github.com/Rohea/Gaufrette.git) PHP · 302 lines

1 <?php

2

3 namespace Gaufrette\Adapter;

186 );

187

188 return isset($response['Headers']['last-modified']) ? strtotime($response['Headers']['last-modified']) : false;

189 }

190

pdf_saleReport.php (https://github.com/LinxHQ/linxbooks.git) PHP · 195 lines

1 <?php

2

3 $thousand =LbGenera::model()->getGeneraSubscription()->lb_thousand_separator;

6 $method = LbPayment::model()->method;

7 $date_from = date('Y-m-d');

8 $date_to = date('Y-m-d', strtotime("+1 month -1 day"));

9 $customer_id = false;

10 if (isset($_REQUEST['search_date_from']) && $_REQUEST['search_date_from'] != "")

11 $date_from = date('Y-m-d', strtotime($_REQUEST['search_date_from']));

12 if (isset($_REQUEST['search_date_to']) && $_REQUEST['search_date_to'] != "")

13 $date_to = date('Y-m-d', strtotime($_REQUEST['search_date_to']));

mhi.php (https://github.com/error10/Ushahidi_Web.git) PHP · 140 lines

60 <!-- green-box -->

61 <div class="green-box" id="submitStatus">

62 <h3><?php echo Kohana::lang('ui_admin.instances'); ?> <?php echo $form_action; ?> <a href="#" id="hideMessage" class="hide"><?php echo Kohana::lang('ui_main.hide_this_message');?></a></h3>

63 </div>

64 <?php

121 if ($instance_active)

122 {

123 ?><a href="#" class="status_yes" onclick="mhiAction('u','UNAPPROVE', '<?php echo $instance_id; ?>');"><?php echo Kohana::lang('ui_main.approved');?></a><?php

124 }

125 else

126 {

127 ?><a href="#" class="status_no" onclick="mhiAction('a','APPROVE', '<?php echo $instance_id; ?>');"><?php echo Kohana::lang('ui_main.approve');?></a><?php

128 }

129 ?></li>

class-wc-queue-interface.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 125 lines

1 <?php

2 /**

3 * Queue Interface

108 * 'hook' => '' - the name of the action that will be triggered.

109 * 'args' => null - the args array that will be passed with the action.

110 * 'date' => null - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone.

111 * 'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '='.

112 * 'modified' => null - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone.

files.php (https://github.com/genievn/pyrocms.git) PHP · 200 lines

1 <?php defined('BASEPATH') OR exit('No direct script access allowed');

2 /**

3 * @package PyroCMS

179 }

180 else if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) &&

181 (strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == filemtime($image_thumb)) &&

182 $expire )

183 {

198 }

199

200 /* End of file files.php */

201

login.php (https://gitlab.com/reclamare/mao) PHP · 130 lines

1 <?php

2 class ControllerCheckoutLogin extends Controller {

3 public function index() {

58 $login_info = $this->model_account_customer->getLoginAttempts($this->request->post['email']);

59

60 if ($login_info && ($login_info['total'] >= $this->config->get('config_login_attempts')) && strtotime('-1 hour') < strtotime($login_info['date_modified'])) {

61 $json['error']['warning'] = $this->language->get('error_attempts');

62 }

ChangeController.class.php (https://gitlab.com/xuebutayan/yshop) PHP · 301 lines

1 <?php

2

3 namespace Admin\Controller;

52 }

53 if ( isset($_GET['time-start']) ) {

54 $map['update_time'][] = array('egt',strtotime(I('time-start')));

55 }

56 if ( isset($_GET['time-end']) ) {

57 $map['update_time'][] = array('elt',24*60*60 + strtotime(I('time-end')));

58 }

59 if ( isset($_GET['nickname']) ) {

TaskExport.php (https://gitlab.com/x33n/kanboard) PHP · 143 lines

1 <?php

2

3 namespace Model;

82

83 if (! is_numeric($to)) {

84 $to = $this->dateParser->removeTimeFromTimestamp(strtotime('+1 day', $this->dateParser->getTimestamp($to)));

85 }

86

functions.php (https://gitlab.com/edward.pattillo/phpCourseExamples) PHP · 271 lines

1 <?php

2

3

81 $albumReleaseDate = $albumInfo[0]['albumReleaseDate'];

82

83 if ($dateType == 'Before' && strtotime($searchDate) > strtotime($albumReleaseDate)) {

84

85 $filteredTracks[]['trackID'] = $trackID;

86 } else if ($dateType == 'After' && strtotime($searchDate) <= strtotime($albumReleaseDate)) {

87

88 $filteredTracks[]['trackID'] = $trackID;

238 echo $errorArray[2].'<br>';

239

240 // exit means to stop interpreting the PHP.

241 // nothing will be returned and anything after the line of code

242 // where this function was called will execute

currency.php (https://bitbucket.org/allanxyh/uniquemall.git) PHP · 150 lines

1 <?php

2 class ModelLocalisationCurrency extends Model {

3 public function addCurrency($data) {

109 $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "currency WHERE code != '" . $this->db->escape($this->config->get('config_currency')) . "'");

110 } else {

111 $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "currency WHERE code != '" . $this->db->escape($this->config->get('config_currency')) . "' AND date_modified < '" . $this->db->escape(date('Y-m-d H:i:s', strtotime('-1 day'))) . "'");

112 }

113

Thread.php (https://github.com/Vernice238/DTUI_201105.git) PHP · 337 lines

1 <?php

2

3 /**

189 else if ($input['create_redirect'] == 'expiring')

190 {

191 $expiryDate = strtotime('+' . $input['redirect_ttl_value'] . ' ' . $input['redirect_ttl_unit']);

192 $options = array('redirect' => true, 'redirectExpiry' => $expiryDate);

193 }

266 else if ($input['create_redirect'] == 'expiring')

267 {

268 $expiryDate = strtotime('+' . $input['redirect_ttl_value'] . ' ' . $input['redirect_ttl_unit']);

269 $options = array('redirect' => true, 'redirectExpiry' => $expiryDate);

270 }

CMB2_Utils.php (https://gitlab.com/iamgraeme/royalmile) PHP · 194 lines

1 <?php

2 /**

3 * CMB2 Utilities

118 return $this->is_valid_time_stamp( $string )

119 ? (int) $string :

120 strtotime( (string) $string );

121 }

122

129 public function is_valid_time_stamp( $timestamp ) {

130 return (string) (int) $timestamp === (string) $timestamp

131 && $timestamp <= PHP_INT_MAX

132 && $timestamp >= ~PHP_INT_MAX;

168 }

169

170 if ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) ) {

171 // Windows

172 $content_dir = str_replace( '/', DIRECTORY_SEPARATOR, WP_CONTENT_DIR );

Campaign.php (https://gitlab.com/hoanghung.dev/aloads) PHP · 104 lines

1 <?php

2 /**

3 * Created by PhpStorm.

54 $data['filterCountry'] = ($this->_request->getPost('filterCountry') != null)?json_encode($this->_request->getPost('filterCountry')):'["all"]';

55 $data['mobileIdFilter'] = ($this->_request->getPost('mobileIdFilter') != null)?json_encode($this->_request->getPost('mobileIdFilter')):'["all"]';

56 $data['startCampaign'] = date('Y-m-d H:i:s',strtotime($this->_request->getPost('startCampaign')));

57 $data['endCampaign'] = date('Y-m-d H:i:s',strtotime($this->_request->getPost('endCampaign')));

80 $data['filterCountry'] = ($this->_request->getPost('filterCountry') != null)?json_encode($this->_request->getPost('filterCountry')):'["all"]';

81 $data['mobileIdFilter'] = ($this->_request->getPost('mobileIdFilter') != null)?json_encode($this->_request->getPost('mobileIdFilter')):'["all"]';

82 $data['startCampaign'] = date('Y-m-d H:i:s',strtotime($this->_request->getPost('startCampaign')));

83 $data['endCampaign'] = date('Y-m-d H:i:s',strtotime($this->_request->getPost('endCampaign')));

CronogramaLectura_model.php (https://gitlab.com/AnonymousMaster/scot-n) PHP · 272 lines

75 $rows = $query->result_array();

76 foreach ($rows as $key => $row) {

77 $rows[$key]['DlaFchTm'] = date('d/m/Y', strtotime($row['DlaFchTm']));

78 }

79

94 $fechaToma = date('d/m/Y', strtotime($row['DlaFchTm']));

95 $fechaAnt = date('d/m/Y', strtotime('- ' . $row['DlaDia'] . ' day', strtotime($row['DlaFchTm'])));

96 $fechaEntrega = date('d/m/Y', strtotime('- 1 day', strtotime($row['DlaFchTm'])));

97 $fechaConsistencia = date('d/m/Y', strtotime('+ 1 day', strtotime($row['DlaFchTm'])));

98 $rows[$key]['valores'] = array('DlaFchTm' => $fechaToma, 'DlaDia' => $row['DlaDia'], 'AuxFchAn' => $fechaAnt,

99 'AuxFchEn' => $fechaEntrega, 'AuxFchCo' => $fechaConsistencia);

113 $rows = $query->result_array();

114 foreach ($rows as $key => $row) {

115 $rows[$key]['AuxFchAn'] = date('d/m/Y', strtotime('- ' . $row['DlaDia'] . ' day', strtotime($row['DlaFchTm'])));

116 }

117 return array_column($rows, 'AuxFchAn', 'DlaGprId');

notebook_repository.class.php (https://bitbucket.org/frchico/chamilo_openshift.git) PHP · 387 lines

1 <?php

2

3 namespace Notebook;

308

309 $creation_date = $item->creation_date;

310 $creation_date = is_string($creation_date) ? strtotime($creation_date) : $creation_date;

311 $creation_date = date('Y-m-d H:i:s', $creation_date);

312

xmlrpc.php (https://github.com/LastRose/MetaWeblog-API-for-CodeIgnitor.git) PHP · 282 lines

1 <?php if (!defined('BASEPATH')) {

2 exit('No direct script access allowed');

3 }

202 'url_friendly' => url_title($content['title']),

203 'publishDate' => (isset($content['dateCreated']) && $content['dateCreated'] ?

204 mdate("%Y-%m-%d %H:%i:%s", strtotime($content['dateCreated'])) :

205 mdate("%Y-%m-%d %H:%i:%s")),

206 );

230 'url_friendly' => url_title($content['title']),

231 'publishDate' => (isset($content['dateCreated']) && $content['dateCreated'] ?

232 mdate("%Y-%m-%d %H:%i:%s", strtotime($content['dateCreated'])) :

233 mdate("%Y-%m-%d %H:%i:%s")),

234 );

fsource_Smarty_plugins_smartypluginsshared.make_timestamp.php.html (https://github.com/lilin01/haha.git) HTML · 64 lines

10 <h1>Source for file shared.make_timestamp.php</h1>

11 <p>Documentation is available at <a href="../Smarty/plugins/_smarty_plugins_shared_make_timestamp_php.html">shared.make_timestamp.php</a></p>

12 <div class="src-code">

13 <pre><ol><li><a name="a1"></a><span class="src-php">&lt;?php</span></li>

34 <li><a name="a22"></a> <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">(</span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'/^\d{14}$/'</span><span class="src-sym">, </span><span class="src-var">$string</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>

35 <li><a name="a23"></a> <span class="src-comm">// it is mysql timestamp format of YYYYMMDDHHMMSS? </span></li>

36 <li><a name="a24"></a> <span class="src-var">$time </span>= <a href="http://www.php.net/mktime">mktime</a><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-num">8</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">,</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-num">10</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">,</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-num">12</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">,</span></li>

37 <li><a name="a25"></a> <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-num">4</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">,</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-num">6</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">,</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">, </span><span class="src-num">4</span><span class="src-sym">))</span><span class="src-sym">;</span></li>

44 <li><a name="a32"></a> <span class="src-comm">// strtotime should handle it</span></li>

45 <li><a name="a33"></a> <span class="src-var">$time </span>= <a href="http://www.php.net/strtotime">strtotime</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">)</span><span class="src-sym">;</span></li>

46 <li><a name="a34"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$time </span>== -<span class="src-num">1 </span>|| <span class="src-var">$time </span>=== <span class="src-id">false</span><span class="src-sym">) </span><span class="src-sym">{</span></li>

47 <li><a name="a35"></a> <span class="src-comm">// strtotime() was not able to parse $string, use &quot;now&quot;:</span></li>

59 </div>

60 <p class="notes" id="credit">

61 Documentation generated on Wed, 05 Aug 2009 07:46:01 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>

62 </p>

63 </body>

ezlog.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 226 lines

1 <?php

2 /**

3 * File containing the eZLog class.

12

13 /*!

14 \class eZLog ezlog.php

15 \ingroup eZUtils

16 */

54 if ( $logFile )

55 {

56 $time = strftime( "%b %d %Y %H:%M:%S", strtotime( "now" ) );

57 $logMessage = "[ " . $time . " ] $message\n";

58 @fwrite( $logFile, $logMessage );

110 if ( $logFile )

111 {

112 $time = strftime( "%b %d %Y %H:%M:%S", strtotime( "now" ) );

113 $logMessage = "[ " . $time . " ] [" . $dir . $name . "]\n";

114 @fwrite( $logFile, $logMessage );

RequestDataCollector.php (https://github.com/Faianca/symfony.git) PHP · 174 lines

1 <?php

2

3 /*

147 $expires = $expires->getTimestamp();

148 } else {

149 $expires = strtotime($expires);

150 if (false === $expires || -1 == $expires) {

151 throw new \InvalidArgumentException(sprintf('The "expires" cookie parameter is not valid.', $expires));

inc.listado-curriculums-experiencias.php (https://bitbucket.org/elulice/gestionar.git) PHP · 113 lines

60 ?>

61 <tr>

62 <td class="listado-fila-bg-<?php print($sPosicion); ?>">

63

64 <table width="100%" border="0" cellspacing="0" cellpadding="0">

71 <td width="30"><a href="javascript:verExperiencia(<?php print($aRegistro["DPueNro"]); ?>)"><img src="images/btn-ver-mas-<?php print($sPosicion); ?>.jpg" alt="Vista Rapida" width="24" height="23" border="0"></a></td>

72 <td width="30"><a href="am-curriculums-experiencias.php?idregistro=<?php print($aRegistro["DPueNro"]); ?>&idpostulante=<?php print $m_lIDPostulante; ?>&url=<?php print($m_sURL); ?>"><img src="images/btn-modificar-<?php print($sPosicion); ?>.jpg" alt="Editar" width="24" height="23" border="0"></a></td>

73

74 <td><a href="abm.php?tabla=experiencia_laboral&columna=DPueNro&idregistro=<?php print($aRegistro["DPueNro"]); ?>&url=<?php print($m_sURL); ?>" onclick="return confirm('&iquest;Desea eliminar esta Experiencia?')"><img src="images/btn-eliminar-<?php print($sPosicion); ?>.jpg" alt="Eliminar" width="24" height="23" border="0"></a></td>

78 <td width="250" class="listado-texto"><?php print($aRegistro["PueUltimaEmpresa"]); ?></td>

79 <td width="110" align="center" class="listado-texto"><?php print(date("d/m/Y", strtotime($aRegistro["PueFechaBaja"]))); ?></td>

80 </tr>

81 <tr>

105 <td><table width="100%" border="0" cellspacing="0" cellpadding="0">

106 <tr>

107 <td width="100"><a href="am-curriculums-experiencias.php?idregistro=0&idpostulante=<?php print $m_lIDPostulante; ?>&url=<?php print($m_sURL); ?>"><img src="images/listado-pie-inicio.jpg" alt="Agregar" width="100" height="40" border="0"></a></td>

108 <td class="listado-pie-bg">&nbsp;</td>

109 <td width="20"><img src="images/listado-pie-final.jpg" width="20" height="40"></td>

FormatDateTest.php (https://gitlab.com/guillaumev/alkarama) PHP · 92 lines

1 <?php

2

3 namespace Drupal\KernelTests\Core\Datetime;

53 $formatter = $this->container->get('date.formatter');

54

55 $timestamp = strtotime('2007-03-26T00:00:00+00:00');

56 $this->assertSame('Sunday, 25-Mar-07 17:00:00 PDT', $formatter->format($timestamp, 'custom', 'l, d-M-y H:i:s T', 'America/Los_Angeles', 'en'), 'Test all parameters.');

57 $this->assertSame('domingo, 25-Mar-07 17:00:00 PDT', $formatter->format($timestamp, 'custom', 'l, d-M-y H:i:s T', 'America/Los_Angeles', self::LANGCODE), 'Test translated format.');

CacheEngine.php (https://gitlab.com/grlopez90/servipro) PHP · 190 lines

1 <?php

2 /**

3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

5 *

9 *

10 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

11 * @link http://cakephp.org CakePHP(tm) Project

12 * @package Cake.Cache

13 * @since CakePHP(tm) v 1.2.0.4933

14 * @license http://www.opensource.org/licenses/mit-license.php MIT License

15 */

16

17 /**

18 * Storage engine for CakePHP caching

19 *

20 * @package Cake.Cache

common.php (https://bitbucket.org/prasoon2211/schooldayz.git) PHP · 107 lines

1 <?php

2 /**

3 * This is a controller for functions that are used globally

84 'assigned_to_lid' => $respondent,

85 'date_time_update' => $date_time_posted,

86 'date_time_completion' => date('Y-m-d', strtotime($date_time_completion)),

87 'details' => $message,

88 'ticket_update' => '',

104 }

105

106 /* End of file admin.php */

107 /* Location: ./application/controllers/admin.php */

ActualTimeline1.php (https://gitlab.com/abigabaw/dptt) PHP · 181 lines

1 <?php

2 namespace common\components;

3 use Yii;

77 switch($ar['iteration_type_id']){

78 case 1:

79 $this->dataset_normal .= '{ x: '.strtotime($ar['start_date']).'000, y: '.$scale[$ar['milestone_id']].' },';

80 $this->dataset_data_normal .='{ x: '.strtotime($ar['start_date']).'000, text: \'<b>Started milestone:</b> <br/>'.str_replace('\'', '', $ar['milestone']).'<br/>\' },';

81

82 $this->dataset_normal .= '{ x: '.strtotime($ar['end_date']).'000, y: '.$scale[$ar['milestone_id']].' },';

83 $this->dataset_data_normal .='{ x: '.strtotime($ar['end_date']).'000, text: \'<b>Submitted milestone:</b> <br/>'.str_replace('\'', '', $ar['milestone']).'<br/>\' },';

85 break;

86 case 2:

87 $this->dataset_normal_extension .= '{ x: '.strtotime($ar['start_date']).'000, y: '.$scale[$ar['milestone_id']].' },';

88 $this->dataset_data_normal_extension .='{ x: '.strtotime($ar['start_date']).'000, text: \'<b>Extended milestone:</b> <br/>'.str_replace('\'', '', $ar['milestone']).'<br/>\' },';

gdpr.php (https://github.com/ocStore/ocStore.git) PHP · 298 lines

1 <?php

2 namespace Opencart\Admin\Controller\Customer;

3 class Gdpr extends \Opencart\System\Engine\Controller {

127 'action' => $this->language->get('text_' . $result['action']),

128 'status' => $result['status'],

129 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),

130 'approve' => $this->url->link('customer/gdpr|approve', 'user_token=' . $this->session->data['user_token'] . '&gdpr_id=' . $result['gdpr_id'], true),

131 'deny' => $this->url->link('customer/gdpr|deny', 'user_token=' . $this->session->data['user_token'] . '&gdpr_id=' . $result['gdpr_id'], true),

currency.php (https://gitlab.com/reclamare/mao) PHP · 152 lines

1 <?php

2 class ModelLocalisationCurrency extends Model {

3 public function addCurrency($data) {

109 $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "currency WHERE code != '" . $this->db->escape($this->config->get('config_currency')) . "'");

110 } else {

111 $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "currency WHERE code != '" . $this->db->escape($this->config->get('config_currency')) . "' AND date_modified < '" . $this->db->escape(date('Y-m-d H:i:s', strtotime('-1 day'))) . "'");

112 }

113

functions.bb-capabilities.php (https://github.com/jazbek/nycga2.git) PHP · 348 lines

1 <?php

2 /**

3 * bbPress Roles and Capabilities Wrapping Functions.

65 'keep_gate' => true, // Make new Key Masters //+

66 'import_export' => true, // Import and export data //+

67 'recount' => true, // bb-do-counts.php //+

68 'manage_options' => true, // backend //+

69 'manage_themes' => true, // Themes //+

79 'stick_topics' => true,

80 'move_topics' => true,

81 'view_by_ip' => true, // view-ip.php

82 'edit_closed' => true, // Edit closed topics

83 'edit_deleted' => true, // Edit deleted topics/posts

228 if ( !topic_is_open( $bb_post->topic_id ) )

229 $caps[] = 'edit_closed';

230 $post_time = bb_gmtstrtotime( $bb_post->post_time );

231 $curr_time = time() + 1;

232 $edit_lock = bb_get_option( 'edit_lock' );

class-wc-shortcode-checkout.php (https://bitbucket.org/pless84/woocommerce.git) PHP · 231 lines

125 <?php _e( 'Order:', 'woocommerce' ); ?>

126 <strong><?php echo $order->get_order_number(); ?></strong>

127 </li>

128 <li class="date">

129 <?php _e( 'Date:', 'woocommerce' ); ?>

130 <strong><?php echo date_i18n(get_option('date_format'), strtotime($order->order_date)); ?></strong>

131 </li>

132 <li class="total">

134 <strong><?php echo $order->get_formatted_order_total(); ?></strong>

135 </li>

136 <?php if ($order->payment_method_title) : ?>

137 <li class="method">

138 <?php _e( 'Payment method:', 'woocommerce' ); ?>

139 <strong><?php

140 echo $order->payment_method_title;

141 ?></strong>

ContentReviewSettingsTest.php (https://github.com/silverstripe-labs/silverstripe-contentreview.git) PHP · 321 lines

1 <?php

2

3 namespace SilverStripe\ContentReview\Tests;

53 $page->write();

54

55 $this->assertEquals(date('Y-m-d', strtotime("now + 10 days")), $page->NextReviewDate);

56 }

57

81

82 $this->assertEquals(

83 date('Y-m-d', strtotime("now + " . $page->ReviewPeriodDays . " days")),

84 $page->NextReviewDate

85 );

94

95 $page = $this->objFromFixture(Page::class, "page-1-1");

96 $this->assertEquals(date('Y-m-d', strtotime("now + 5 days")), $parentPage->NextReviewDate);

97 $this->assertEquals('2011-04-12', $page->NextReviewDate);

98

DateTime.php (https://gitlab.com/Griffolion/Game-Embargo-Tracker) PHP · 228 lines

1 <?php

2

3 namespace Faker\Provider;

17 }

18

19 return strtotime(empty($max) ? 'now' : $max);

20 }

21

93 /**

94 * Get a DateTime object based on a random date between two given dates.

95 * Accepts date strings that can be recognized by strtotime().

96 *

97 * @param string $startDate Defaults to 30 years ago

102 public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now')

103 {

104 $startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate);

105 $endTimestamp = static::getMaxTimestamp($endDate);

106

ip.php (https://gitlab.com/shapcy/opencart) PHP · 204 lines

1 <?php

2 class ControllerFraudIp extends Controller {

3 private $error = array();

143 'ip' => $result['ip'],

144 'total' => $this->model_customer_customer->getTotalCustomersByIp($result['ip']),

145 'date_added' => date('d/m/y', strtotime($result['date_added'])),

146 'filter_ip' => $this->url->link('customer/customer', 'token=' . $this->session->data['token'] . '&filter_ip=' . $result['ip'], true)

147 );

ActualTimeline.php (https://gitlab.com/abigabaw/dptt) PHP · 155 lines

1 <?php

2 namespace frontend\components;

3 use Yii;

51 switch($ar['iteration_type']){

52 case 1:

53 $this->dataset_normal .= '{ x: '.strtotime($ar['start_date']).'000, y: '.$ar['milestone_id'].' },';

54 $this->dataset_data_normal .='{ x: '.strtotime($ar['start_date']).'000, text: \'<b>Started milestone:</b> <br/>'.str_replace('\'', '', $ar['milestone']).'<br/>\' },';

55

56 $this->dataset_normal .= '{ x: '.strtotime($ar['end_date']).'000, y: '.$ar['milestone_id'].' },';

57 $this->dataset_data_normal .='{ x: '.strtotime($ar['end_date']).'000, text: \'<b>Submitted milestone:</b> <br/>'.str_replace('\'', '', $ar['milestone']).'<br/>\' },';

59 break;

60 case 2:

61 $this->dataset_normal_extension .= '{ x: '.strtotime($ar['start_date']).'000, y: '.$ar['milestone_id'].' },';

62 $this->dataset_data_normal_extension .='{ x: '.strtotime($ar['start_date']).'000, text: \'<b>Extended milestone:</b> <br/>'.str_replace('\'', '', $ar['milestone']).'<br/>\' },';

function.html_select_time.php (https://github.com/cabenitez/factuweb.git) PHP · 364 lines

1 <?php

2 /**

3 * Smarty plugin

10 * @ignore

11 */

12 require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');

13 /**

14 * @ignore

15 */

16 require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');

17

18 /**

23 * Purpose: Prints the dropdowns for time selection

24 *

25 * @link http://www.smarty.net/manual/en/language.function.html.select.time.php {html_select_time}

26 * (Smarty online manual)

27 * @author Roberto Berto <roberto@berto.net>

PmaSeleniumDbEventsTest.php (https://gitlab.com/luyxtran264/myproject) PHP · 212 lines

1 <?php

2 /* vim: set expandtab sw=4 ts=4 sts=4: */

3 /**

4 * Selenium TestCase for table related tests

5 *

6 * @package PhpMyAdmin-test

7 * @subpackage Selenium

8 */

9

10 require_once 'TestBase.php';

11

12 /**

13 * PmaSeleniumDbEventsTest class

14 *

15 * @package PhpMyAdmin-test

16 * @subpackage Selenium

17 * @group selenium

post.php (https://github.com/lysender/ff2fb.git) PHP · 144 lines

1 <!-- wrapper needed -->

2 <?php

3 $feed_content = null;

4 $title = null;

14 }

15

16 $ts = strtotime($feed_content['date']);

17 $span = Dc_Date::fuzzy_span($ts);

18 ?>

20 <a href="http://friendfeed.com/<?php echo $feed_content['from']['id'] ?>">

21 <img src="http://friendfeed-api.com/v2/picture/<?php echo $feed_content['from']['id'] ?>?size=medium" alt="<?php echo HTML::chars($feed_content['from']['name'] . " profile image") ?>" />

22 </a>

23 </div>

24 <div class="ebody">

25 <p class="name">

26 <a href="<?php echo URL::site('post/index/' . $feed_content['id'], true) ?>" title="<?php echo $title ?>">

27 <?php echo HTML::chars($feed_content['from']['name']) ?>

supporter.php (https://github.com/thomasbennett/localbnd.git) PHP · 157 lines

1 <?php

2 /*

3 Plugin Name: Supporter Integration

32 <label for='aff_pay'><?php _e('Enable membership / supporter integration','membership'); ?></label>

33 <select name="membership_supporter_integration">

34 <?php

35 $membership_supporter_integration = get_option( "membership_supporter_integration_" . $sub_id );

36 if(empty($membership_supporter_integration)) $membership_supporter_integration = 'no';

37 ?>

38 <option value='no' <?php selected('no', $membership_supporter_integration); ?>><?php _e('No','membership'); ?></option>

39 <option value='yes' <?php selected('yes', $membership_supporter_integration); ?>><?php _e('Yes','membership'); ?></option>

75 $blog = get_blog_details($blogid);

76 ?>

77 <option value='<?php echo $blogid; ?>' <?php selected($blogid, $myblogid); ?>><?php echo $blog->blogname; ?></option>

78 <?php

profile.php (https://gitlab.com/sejator/posci4) PHP · 122 lines

11 </div>

12 <h3 class="profile-username text-center"></h3>

13 <p class="text-muted text-center">Tanggal Daftar : <?= esc(date('d M Y', strtotime($user->created_at))); ?></p>

14 </div>

15 <!-- /.card-body -->

120 </script>

121

122 <?php $this->endSection(); ?>