Skip to content

Instantly share code, notes, and snippets.

@jefftrull
Created December 10, 2012 01:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jefftrull/4247930 to your computer and use it in GitHub Desktop.
Save jefftrull/4247930 to your computer and use it in GitHub Desktop.
Reproducing Date serialization issue - controller
public with sharing class DateIssueRepro {
// controller for testing Date setting issue ( case 08471144 )
// 2012-12-09 Jeff Trull <jetrull@sbcglobal.net>
public String selectedSer { get; set; } // only needed to set default
public DateIssueRepro() {
// initialize serialization method
selectedSer = 'none';
}
@RemoteAction public static
void updateContact( Contact ct ) {
System.debug('SObject processor: received date: ' + String.valueOf(ct.Birthdate));
}
@RemoteAction public static
void updateDate( Date dt ) {
System.debug('Plain Date processor: received date: ' + String.valueOf(dt));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment