Fabrik Home

Go Back   Fabrik > Fabrik 2.0.x > Bronze Subscriber Support


Bronze Subscriber Support This is the monitored support forum for Bronze Supporters. Although we do our best to answer all posts in Bronze support on a FIFO basis (First In, First Out) every day, sometimes we simply don't have the time to get to everyone. We leave it up to you to keep your issues on our radar! If you haven't received a response within one working day, it is likely that you will need to "bump" your thread (by posting a short, polite follow-up saying something like "friendly bump"). It also helps everyone if you remember to close your threads once they are resolved (using the Thread Tools menu). You can always re-open them later if need be.

Reply
 
Thread Tools
Old 01-29-2010, 11:04 PM   #1
vsawri
Junior Member
Supporter
 
Join Date: Oct 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
vsawri has not earned any Fabrik kudos yet
Default 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.

vsawri is offline   Reply With Quote


Old 01-30-2010, 12:04 AM   #2
vsawri
Junior Member
Supporter
 
Join Date: Oct 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
vsawri has not earned any Fabrik kudos yet
Default

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 ?
vsawri is offline   Reply With Quote
Old 01-30-2010, 12:23 AM   #3
cheesegrits
Support Gopher
 
cheesegrits's Avatar
 
Join Date: Aug 2007
Location: Huntsville, AL
Posts: 16,760
Thanks: 167
Thanked 527 Times in 492 Posts
cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God
Send a message via MSN to cheesegrits Send a message via Yahoo to cheesegrits Send a message via Skype™ to cheesegrits
Default

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
__________________
SVN Info
Unfuddle (username and password 'anonymous')
Tutorials
cheesegrits is offline   Reply With Quote
Old 01-30-2010, 12:35 AM   #4
vsawri
Junior Member
Supporter
 
Join Date: Oct 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
vsawri has not earned any Fabrik kudos yet
Default

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..
vsawri is offline   Reply With Quote
Old 01-30-2010, 02:46 AM   #5
cheesegrits
Support Gopher
 
cheesegrits's Avatar
 
Join Date: Aug 2007
Location: Huntsville, AL
Posts: 16,760
Thanks: 167
Thanked 527 Times in 492 Posts
cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God cheesegrits is a Fabrik God
Send a message via MSN to cheesegrits Send a message via Yahoo to cheesegrits Send a message via Skype™ to cheesegrits
Default

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
__________________
SVN Info
Unfuddle (username and password 'anonymous')
Tutorials
cheesegrits is offline   Reply With Quote
Old 01-30-2010, 10:51 PM   #6
vsawri
Junior Member
Supporter
 
Join Date: Oct 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
vsawri has not earned any Fabrik kudos yet
Default

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;
vsawri is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting blank date fields in a Date Element altnetwork Bronze Subscriber Support 10 10-14-2009 07:23 PM
Date time problem lukas.martin Community Support 2 08-12-2009 03:08 AM
time element for date/time no longer has an id kuliksco Community Support 3 06-16-2009 04:57 PM
SVN 1228 Date Time field saves current Date Time if empty nbradshaw Fabrik 2.0 Beta Testing 14 03-05-2009 01:35 PM
date element - first time use jubahn Subscriber Support 5 11-21-2008 07:17 PM

» 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
Powered by vBadvanced CMPS v3.0.0

All times are GMT. The time now is 03:01 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios