 |
01-29-2010, 11:04 PM
|
#1
|
|
Junior Member
Supporter
Join Date: Oct 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
csv exporting & importing: date & time fields
1) is there a way to make it so that when i export date and time fields into csv, i get what i see in the fabrik table instead of what's in mysql ? mysql seems to have a different timezone so all my date time data when exported to csv is set to +6hrs from CST. i want the export to be in CST.
2) and is there a way to import csv back without losing the time portion of a date time field ?
thx.
|
|
|
01-30-2010, 12:04 AM
|
#2
|
|
Junior Member
Supporter
Join Date: Oct 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
another issue i have
3) when i use the 'Always return todays date' it outputs date & time with +6hrs offset from CST also? is there anyway to localize all of this ?
|
|
|
01-30-2010, 12:23 AM
|
#3
|
|
Support Gopher
Join Date: Aug 2007
Location: Huntsville, AL
Posts: 16,760
Thanks: 167
Thanked 527 Times in 492 Posts
|
1) At the moment, no. We always store datetime in the database in GMT, and apply the server TZ offset when rendering. So the assumption on CSV import / export is that all times are in GMT. This might be an option we can add to the import/export at some point, but at the moment ... it's GMT.
2) I wasn't aware we were losing the time portion. I'll take a look. Out of interest, what are your form and table date formats set to on your date element?
3) When you say "it outputs", do you mean that's what is in the raw table, or that's what we are showing when rendering a table or form?
-- hugh
|
|
|
01-30-2010, 12:35 AM
|
#4
|
|
Junior Member
Supporter
Join Date: Oct 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
1) k, thx.
2) k, thx, and date elements set to %Y-%m-%d for form (cause it has that time selector), date elements %Y-%m-%d %H:%M for table.
3) its what the rendered form and table is showing.
thx for the assistance hugh
also, i'm using latest
svn
.
-sawri
Last edited by vsawri; 01-30-2010 at 12:38 AM..
|
|
|
01-30-2010, 02:46 AM
|
#5
|
|
Support Gopher
Join Date: Aug 2007
Location: Huntsville, AL
Posts: 16,760
Thanks: 167
Thanked 527 Times in 492 Posts
|
For 3), I seem to recall some discussion of the wy's and wherefore's of this recently.
For now, I suggest you just create you own eval'ed default using date() or gmdate() as appropriate, so you get whatever result you are wanting.
-- hugh
|
|
|
01-30-2010, 10:51 PM
|
#6
|
|
Junior Member
Supporter
Join Date: Oct 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
k, thanks hugh.
just in case someone ran into this same issue, and needed a quick fix, here's how i ended up doing it. with the following javascript set run onload.
it updates the datetime element 'fab_WorkSchedule___ludate'
Code:
dn = new Date();
dnmon = (dn.getMonth() + 1);
if (dnmon < 10) {
dnmon = '0' + dnmon;}
dnmin = dn.getMinutes();
if (dnmin < 10) {
dnmin = '0' + dnmin;}
xdn = dn.getFullYear()+'-'+dnmon+'-'+dn.getDate()+' '+dn.getHours()+':'+dnmin;
$('fab_WorkSchedule___ludate_cal').value = xdn;
|
|
|
 |
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Unfuddle SVN |
| Project: |
Fabrik 2.x |
| Rev |
Comment |
| 3745 |
fixed: J1.5.20 with mootools upgrade plugin enabled - table and form plugin code in admin section was not working
fixed: js... |
| 3744 |
fixed issue with emailtable plus js on send button |
| 3743 |
fixed: js issues with table plugins, js issues with new mootools 1.2.4 system upgrade plugin in Joomla 1.5.20 |
| 3742 |
http://fabrikar.com/forums/showthread.php?t=17010 |
| 3741 |
j1.6 installation work - should now be installable if you make a zip with the folllowing folders: admin (for the... |
| 3740 |
j16 - added update xml manifest in theory this allows for discovery and installation of upgrades to the component by... |
| 3739 |
fixed: fabrikyoutube barfed if you entered an URL containing "watch?v=" which is exactly what's in a youtube URL if you copy... |
| 3738 |
j1.6 fixed spelling mistake in language folder name |
| 3737 |
added installation instruction file |
| 3736 |
fixed: js error in email table plus |
|
All times are GMT. The time now is 03:01 AM.