Jump to content

Search the Community

Showing results for tags 'timestamp'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 5 results

  1. Is it (I'll bet the anwer is Yes) possible to SELECT the oldest entries in the table? "SELECT * FROM `vaults` WHERE `Status` = "Unsolved" ORDER BY `CREATED` LIMIT 75 Would this be correct?
  2. I am trying to format a normal date into a timestamp. To convert a timestamp into the normal date was no problem, but now I have an array with 4 different dates! 2 normal dates : 1991-12-09, 12.03.1984 and also 2 timestamps in one array. If I had the same format I could strpos it and make an if and test with "." that worked last time, but now I have those 4 different formats. Anyone an idea?
  3. I use the theme as an affiliate deals aggregator. I am using WP all import plugin to import deals from xml files. On import, I face a major problem concerning the expire date as in every xml, it is in the format: “2015-04-23 00:00:00”, while your theme requires UNIX timestamp and can not convert. I used strtotime() in wp all import to convert date to timestamp in real time. But im getting this error : Warning: date() expects parameter 2 to be long, string given in /home/xxxx/xxxxx.com/wp-includes/functions.php on line 112/114/116 and 117 The functions.php file : function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) { global $wp_locale; $i = $unixtimestamp; if ( false === $i ) { if ( ! $gmt ) $i = current_time( 'timestamp' ); else $i = time(); // we should not let date() interfere with our // specially computed timestamp $gmt = true; } /* * Store original value for language with untypical grammars. * See https://core.trac.wordpress.org/ticket/9396 */ $req_format = $dateformatstring; $datefunc = $gmt? 'gmdate' : 'date'; if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) { $datemonth = $wp_locale->get_month( $datefunc( 'm', $i ) );-----------LINE 112 $datemonth_abbrev = $wp_locale->get_month_abbrev( $datemonth ); $dateweekday = $wp_locale->get_weekday( $datefunc( 'w', $i ) );------LINE 114 $dateweekday_abbrev = $wp_locale->get_weekday_abbrev( $dateweekday ); $datemeridiem = $wp_locale->get_meridiem( $datefunc( 'a', $i ) );----LINE 116 $datemeridiem_capital = $wp_locale->get_meridiem( $datefunc( 'A', $i) );------LINE 117 $dateformatstring = ' '.$dateformatstring; $dateformatstring = preg_replace( "/([^\\\])D/", "\\1" . backslashit( $dateweekday_abbrev ), $dateformatstring ); $dateformatstring = preg_replace( "/([^\\\])F/", "\\1" . backslashit( $datemonth ), $dateformatstring ); $dateformatstring = preg_replace( "/([^\\\])l/", "\\1" . backslashit( $dateweekday ), $dateformatstring ); $dateformatstring = preg_replace( "/([^\\\])M/", "\\1" . backslashit( $datemonth_abbrev ), $dateformatstring ); $dateformatstring = preg_replace( "/([^\\\])a/", "\\1" . backslashit( $datemeridiem ), $dateformatstring ); $dateformatstring = preg_replace( "/([^\\\])A/", "\\1" . backslashit( $datemeridiem_capital ), $dateformatstring ); $dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 ); }
  4. I have users who signed up for an email list and there is a table of them and the join date is in unix timestamp. I do not care about the date, only the time they signed up. I am putting together code to be run on cron to decide who gets emailed. It will be run probably every hour. When it runs the first thing I need it to do is select all users who from the current time through the next hour registered. This way I can then email people around the time they initially joined my site. Here is what I have: //$input is the minutes range (which will be most likely an hour so this variable should be 60) function to_email($input) { require_once('dbconnect.php'); $cur_hours = date('H'); $cur_minutes = date('i'); $cur_seconds = ($cur_minutes + ($cur_hours * 60)) * 60; $end_seconds = $input * 60; $end_seconds = $cur_seconds + $end_seconds; $result = mysql_query("SELECT * FROM usertable WHERE " . $cur_seconds . " <= (HOUR(opt_time)*60*60) + (MINUTE(opt_time)*60) + SECOND(opt_time) AND '" . $end_seconds . " > (HOUR(opt_time)*60*60) + (MINUTE(opt_time)*60) + SECOND(opt_time)'"); $row = mysql_fetch_array($result); } The php part works as what I think is needed. But the query does not. I am not very good at MySQL queries so don't judge.
  5. Im running a site and have a problem. Visitors can download sermons and can see when the sermon was preached. The problem is that everytime I upload a sermon I have to mannually insert the date of the file into the code. Even if I manually edit the date of the file (last modification date) on my pc. When I upload the file to the server it automatically takes on the current date. I tried the touch function and filemtime function but to no avail. The time keeps ticking and is not static. The whole idea is that I change the modification time on my pc and just upload the sermon and then on the server through code get the time the file was last modified. And that would be the date the sermon was preached.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.