Icon edb_srvutcdatetime

Returns the current ElevateDB Server UTC date and time for a remote connection.

Syntax
edb_srvutcdatetime(<ConnectionHandle>)

<ConnectionHandle> =

Handle of connection returned by edb_connect function

Returns
The ElevateDB Server UTC date/time (STRING) if
successful, or FALSE if there are any errors

Usage
The edb_srvutcdatetime function returns the ElevateDB Server UTC date and time for a remote connection, and returns an empty string for a local connection. UTC is the symbol for Coordinated Universal Time, which is similar to Greenwich Mean Time, but more precise down to fractions of seconds, and is useful for situations where one needs to compare dates and times, irrespective of the client machine's time zone. The date and time is returned in ANSI standard date and time format (24-hour), which is:

YYYY-MM-DD HH:MM:SS.ZZZ

where YYYY is a 4-digit year, MM is a 2-digit month, DD is a 2-digit day, HH is a 2-digit hour, MM is a 2-digit minute, SS is a 2-digit second, and ZZZ is a 3-digit millisecond.

Examples
<?php

// The following script connects to an ElevateDB
// Server and database, displays the server date/time
// using the edb_srvutcdatetime() function, and then
// disconnects using the edb_disconnect() function

$con = edb_connect("type=remote;charset=Ansi;address=127.0.0.1;"+
                   "uid=Administrator;pwd=EDBDefault;database=Test");
if (!$con)
  {
  die("Could not connect: " . edb_errmsg());
  }
echo edb_srvutcdatetime($con);
edb_disconnect($con);
?>
Image