Actions

Difference between revisions of "Proposals/timezones"

From Mahara Wiki

< Proposals
Line 5: Line 5:
 
== Option 1: Convert ==
 
== Option 1: Convert ==
  
=== The following tables need fields and data converted ===
+
=== The following fields need converting ===
  
 
<pre>
 
<pre>
activity_queue
+
activity_queue
artefact
+
ctime
artefact_cron
+
artefact
artefact_internal_profile_email
+
ctime
artefact_log
+
mtime
artefact_plans_task
+
atime
artefact_resume_certification
+
artefact_cron
artefact_resume_educationhistory
+
nextrun
artefact_resume_employmenthistory
+
artefact_internal_profile_email
artefact_resume_membership
+
expiry
artefact_resume_personal_information
+
artefact_log
auth_cron
+
"time"
blocktype_externalfeed_data
+
artefact_plans_task
blocktype_wall_post
+
completiondate
collection
+
artefact_resume_personal_information
cron
+
dateofbirth
export_cron
+
auth_cron
favorite
+
nextrun
"group"
+
blocktype_cron
group_member
+
nextrun
group_member_invite
+
blocktype_externalfeed_data
group_member_request
+
lastupdate
import_cron
+
blocktype_wall_post
import_queue
+
postdate
institution
+
collection
interaction_cron
+
ctime
interaction_forum_edit
+
mtime
interaction_forum_post
+
cron
interaction_instance
+
nextrun
notification_cron
+
export_cron
notification_emaildigest_queue
+
nextrun
notification_internal_activity
+
favorite
search_cron
+
ctime
site_content
+
mtime
site_data
+
"group"
usr
+
ctime
usr_friend
+
mtime
usr_friend_request
+
group_member
usr_infectedupload
+
ctime
usr_institution
+
group_member_invite
usr_institution_request
+
ctime
usr_password_request
+
group_member_request
usr_registration
+
ctime
usr_session
+
grouptype_cron
usr_watchlist_view
+
nextrun
view
+
import_cron
view_access
+
nextrun
view_visit
+
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
 
</pre>
 
</pre>
  

Revision as of 12:40, 26 September 2011

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