← Back to team overview

mahara-contributors team mailing list archive

[Bug 1394359] Re: Adjusting webservices to use ctime, mtime syntax

 

Converting a Unix timestamp to a datetime and back again is what we do
every time we store a date in the database. ;)

There are functions for the conversion in dml.php:

1. db_format_timestamp($timestamp): Converts from a Unix timestamp into
the datetime format suitable to insert into the DB.

2. db_format_tsfield($field): Generates the SQL to convert the database
field from a datetime into a Unix timestamp.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1394359

Title:
  Adjusting webservices to use ctime, mtime syntax

Status in Mahara ePortfolio:
  New

Bug description:
  Currently webservices uses 'timecreated' and 'timemodified' columns in
  the 'external_services' db table which are type INT

   - It would be better to alter them to be 'ctime' and 'mtime' and be
  type DATETIME - so as to be consistent with the other db tables in
  mahara.

  But this will mean converting the unix timestamp to datetime before
  saving to db and back again when extracting from db

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1394359/+subscriptions


References