Brimbox Logo Brimbox Version 2.3.4 Released

rconvert_date>>

This method (a reverse function) converts user and PHP datetime to server and database and datetime.

Class: bb_main, called as $main

File: bb_main.php (php)

Declaration:

function rconvert_date($date, $format = "Y-m-d")

Usage:

$server_date = $main->rconvert_date($date);

Returns: date converted into database and server datetime from local user datetime.

Note: method uses constants DB_TIMEZONE and USER_TIMEZONE from file bb-config.php

Parameter: $date (string, valid php date)
Database date in acceptable format for php (several formats work).

Parameter: $format (string, php date format)
Standard php date format. See http://php.net/manual/en/function.date.php

Updated: 2016-06-16