Actions

Developer Area/Specifications in Development/timezones

From Mahara Wiki

< Developer Area‎ | Specifications in Development
Revision as of 11:40, 26 September 2011 by Melissadraper (talk | contribs) (The following tables need fields and data converted)

Timezone support for Mahara

THIS IS A DRAFT

Option 1: Convert

The following fields need converting

activity_queue	
	ctime
artefact	
	ctime
	mtime
	atime
artefact_cron	
	nextrun
artefact_internal_profile_email	
	expiry
artefact_log	
	"time"
artefact_plans_task	
	completiondate
artefact_resume_personal_information	
	dateofbirth
auth_cron	
	nextrun
blocktype_cron	
	nextrun
blocktype_externalfeed_data	
	lastupdate
blocktype_wall_post	
	postdate
collection	
	ctime
	mtime
cron	
	nextrun
export_cron	
	nextrun
favorite	
	ctime
	mtime
"group"	
	ctime
	mtime
group_member	
	ctime
group_member_invite	
	ctime
group_member_request	
	ctime
grouptype_cron	
	nextrun
import_cron	
	nextrun
import_queue	
	expirytime
institution	
	expiry
interaction_cron	
	nextrun
interaction_forum_edit	
	ctime
interaction_forum_post	
	ctime
interaction_instance	
	ctime
notification_cron	
	nextrun
notification_emaildigest_queue	
	ctime
notification_internal_activity	
	ctime
search_cron	
	nextrun
site_content	
	ctime
	mtime
site_data	
	ctime
usr	
	expiry
	lastlogin
	lastlastlogin
	lastaccess
	suspendedctime
	ctime
usr_friend	
	ctime
usr_friend_request	
	ctime
usr_infectedupload	
	"time"
usr_institution	
	ctime
	expiry
usr_institution_request	
	ctime
usr_password_request	
	expiry
usr_registration	
	expiry
usr_session	
	ctime
usr_watchlist_view	
	ctime
view	
	startdate
	stopdate
	ctime
	mtime
	atime
	submittedtime
view_access	
	startdate
	stopdate
	ctime

Conversion process

Schema

The datetime fields in the database ought to be converted to integer so as to take the unix timestamp.

Stored data

The data contained in these fields then needs to be converted from the machine time to unix time

Code changes

Check all the places in the code where the date is displayed in human readable format.

Resources

http://stackoverflow.com/questions/2689428/mysql-convert-db-from-local-time-to-utc http://stackoverflow.com/questions/2700197/sql-server-convert-date-field-to-utc