Re: SQL data integrity

2010-04-22 Thread Judah McAuley

First off, definitely talk to a lawyer with expertise in that area.

That being said, here are some things that I know can help you out:

1. If the data should not be updated, don't let the user account that
connects to the database have access to the UPDATE or DELETE verbs.
Then you don't have to worry so much about someone accidentally
putting in code that would update or delete data.

2. Do daily offsite backups to a secure location. When I'm dealing
with electronic signatures, one of the concepts that is important to
keep in mind is the chain of custody. Once a person has done
something, who has access to it up til the point that a reviewer looks
at it? If you back it up and put it in a place that people don't
generally have access to, you can show that multiple generations of
the data (multiple backups) all have the same information, unchanged.

3. Sql Server has audit abilities. I haven't gotten deeply into them
and if it is something you really want to nail down, I'd get a db
security consultant that has experience with sql server audit logging,
but here is a decent place to start:
http://msdn.microsoft.com/en-us/library/cc280386.aspx

Hope that helps,
Judah

On Thu, Apr 22, 2010 at 12:30 PM, Justin Scott
 wrote:
>
> Hi all, not a CF-specific question but I'm hoping someone can point me in
> the right direction.  We're building an application where some information
> stored in our database could potentially be subpoenaed to court as evidence.
> One of the issues brought up by the attorneys is the integrity of the data
> stored in the database and how it could be proven in court that the data has
> not been altered since it was entered into the database.  Any ideas on where
> to start looking for a solution to that?  The front-end is ColdFusion with a
> MS-SQL back-end.  This is a new area for me, so it's interesting, but I
> don't have any points of reference to work from either.  Any insight is
> appreciated.  Thanks!
>
>
> -Justin
>
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333099
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SQL data integrity

2010-04-22 Thread Brad Wood

Firstly I have absolutely no experience here and you should probably consult 
with an attorney with experience in this kind of thing.

My best idea would be to institute a process to automatically ship all your 
nightly backups and or transaction logs to a third party to hold on to.  If 
your data was ever brought into question that third party could 
independently verify that the data really was there on that date.

That would be a heck of a lot of data-  but I guess you have to ask yourself 
how much you are willing to pay for this kind of thing.

~Brad 


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333098
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: SQL data integrity

2010-04-22 Thread Justin Scott

> I'm no attorney or law professor but I would look
> into being PCI compliant.  I don't know if this is
> exactly what you need, but it definitely couldn't
> hurt and it is a very high level of security.

Hi Paul, we're pretty familiar with the PCI requirements (we work with a lot
of e-commerce clients).  Unfortunately PCI is more about the security of the
network and the source code, but on this project we're looking at being able
to verify that data hasn't been altered since it was entered into the
database.  For example, someone puts in a message on January 1, 2011 and in
2015 the message gets subpoenaed to court.  An attorney could argue that the
contents of that message could have been altered and is therefore
inadmissible as evidence, so we'd need a way to show definitively that the
record is accurate and has not been changed (and to be able to detect if it
had been changed).  Not the usual web development fare, unfortunately.


-Justin



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333097
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SQL data integrity

2010-04-22 Thread Alan Rother

Your MS SQL Transaction logs COULD be used... But again, this becomes more
of a legal issue than a technical one... We all know given time, we could
manipulate log files...

There must be some sort of technical standards that are used commonly in law
to prove the validity of data.

You may need to seek out legal counsel that specializes in tech law.

=]

On Thu, Apr 22, 2010 at 2:11 PM, Paul Alkema wrote:

>
> I'm no attorney or law professor but I would look into being PCI compliant.
> I don't know if this is exactly what you need, but it definitely couldn't
> hurt and it is a very high level of security. Keep in mind though, that
> it's
> not easy. Good luck.
>
> Regards,
> Paul Alkema
> http://paulalkema.com
>
>
>
> -Original Message-
> From: Justin Scott [mailto:jscott-li...@gravityfree.com]
> Sent: Thursday, April 22, 2010 3:31 PM
> To: cf-talk
> Subject: SQL data integrity
>
>
> Hi all, not a CF-specific question but I'm hoping someone can point me in
> the right direction.  We're building an application where some information
> stored in our database could potentially be subpoenaed to court as
> evidence.
> One of the issues brought up by the attorneys is the integrity of the data
> stored in the database and how it could be proven in court that the data
> has
> not been altered since it was entered into the database.  Any ideas on
> where
> to start looking for a solution to that?  The front-end is ColdFusion with
> a
> MS-SQL back-end.  This is a new area for me, so it's interesting, but I
> don't have any points of reference to work from either.  Any insight is
> appreciated.  Thanks!
>
>
> -Justin
>
>
>
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333096
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: SQL data integrity

2010-04-22 Thread Paul Alkema

I'm no attorney or law professor but I would look into being PCI compliant.
I don't know if this is exactly what you need, but it definitely couldn't
hurt and it is a very high level of security. Keep in mind though, that it's
not easy. Good luck.

Regards,
Paul Alkema
http://paulalkema.com



-Original Message-
From: Justin Scott [mailto:jscott-li...@gravityfree.com] 
Sent: Thursday, April 22, 2010 3:31 PM
To: cf-talk
Subject: SQL data integrity


Hi all, not a CF-specific question but I'm hoping someone can point me in
the right direction.  We're building an application where some information
stored in our database could potentially be subpoenaed to court as evidence.
One of the issues brought up by the attorneys is the integrity of the data
stored in the database and how it could be proven in court that the data has
not been altered since it was entered into the database.  Any ideas on where
to start looking for a solution to that?  The front-end is ColdFusion with a
MS-SQL back-end.  This is a new area for me, so it's interesting, but I
don't have any points of reference to work from either.  Any insight is
appreciated.  Thanks!


-Justin





~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333095
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SQL data integrity

2010-04-22 Thread Won Lee

Look up validation process.


On Thu, Apr 22, 2010 at 3:30 PM, Justin Scott
wrote:

>
> Hi all, not a CF-specific question but I'm hoping someone can point me in
> the right direction.  We're building an application where some information
> stored in our database could potentially be subpoenaed to court as
> evidence.
> One of the issues brought up by the attorneys is the integrity of the data
> stored in the database and how it could be proven in court that the data
> has
> not been altered since it was entered into the database.  Any ideas on
> where
> to start looking for a solution to that?  The front-end is ColdFusion with
> a
> MS-SQL back-end.  This is a new area for me, so it's interesting, but I
> don't have any points of reference to work from either.  Any insight is
> appreciated.  Thanks!
>
>
> -Justin
>
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333094
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


SQL data integrity

2010-04-22 Thread Justin Scott

Hi all, not a CF-specific question but I'm hoping someone can point me in
the right direction.  We're building an application where some information
stored in our database could potentially be subpoenaed to court as evidence.
One of the issues brought up by the attorneys is the integrity of the data
stored in the database and how it could be proven in court that the data has
not been altered since it was entered into the database.  Any ideas on where
to start looking for a solution to that?  The front-end is ColdFusion with a
MS-SQL back-end.  This is a new area for me, so it's interesting, but I
don't have any points of reference to work from either.  Any insight is
appreciated.  Thanks!


-Justin



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333093
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateAdd value different on different servers

2010-04-22 Thread Roger Austin

In CF8



UTC



UTC



UTC



UTC

Output was:

{ts '2010-03-14 00:00:00'}
UTC Sun, 14 Mar 2010 05:00:00 GMT

{ts '2050-07-01 17:07:46'}
UTC Fri, 01 Jul 2050 21:07:46 GMT

{ts '2010-03-15 00:00:00'}
UTC Mon, 15 Mar 2010 04:00:00 GMT

{ts '2050-07-02 16:07:46'}
UTC Sat, 02 Jul 2050 20:07:46 GMT 

 Tom McNeer  wrote: 
> 
> Okay,
> 
> So - it wasn't a JVM issue. Updating it did not change the results.
> 
> And Steve was right, in a way. But I still don't understand why it should be
> this way.
> 
> First, Steve, I understand what you're saying about "whenever you display a
> time." But in practice, I'm not displaying a time at all. I'm simply
> creating a date/time value and adding a number of seconds to it, then
> inserting into a database.
> 
> So to my way of thinking - and according to every doc I've ever read - the
> dateAdd function should do exactly what you tell it to do: just add the
> increments to the original date.
> 
> But what's happening DOES involve DST - though not the time zone. I don't
> know why. It shouldn't. But it does, at least in CF9.
> 
> Try this for yourself: Daylight Savings Time began at 2:00 AM Eastern on
> March 14, 2010. So run the following:
> 
> 
> 
> 
> 
> 
> myDate is two hours _before_ DST went into effect. On two different CF9
> servers, one on EDT, the other on CDT, the result for myDate2 was:
> {ts '2050-07-01 17:07:46'}
> 
> Now change the createDate to (2010,3,15) - _after_ DST went into effect. On
> the same servers, the result was:
> {ts '2050-07-02 16:07:46'}
> 
> The original date was changed by a day. But the result of the dateAdd
> statement changed by 23 hours.
> 
> I wish I could test this on CF8 and/or 7, but the only servers with those
> versions to which I have access are in Arizona, where they don't use DST.
> Those servers return the 16:07:46 timestamp. But without having the machines
> set to DST, I can't tell if CF is acting differently or not.


--
http://www.linkedin.com/pub/roger-austin/8/a4/60
http://twitter.com/RogerTheGeek
http://www.misshunt.com/ Home of the Clean/Dirty Magnet
http://www.ncdevcon.com/ TACFUG 2010 Conference in North Carolina


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333092
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateAdd value different on different servers [spamtrap heur]

2010-04-22 Thread Paul Hastings

> I'm planning on using timezone.cfc for a lot of my calendar-related
> functionality in the future due to these issues:
>
> http://timezonecfc.riaforge.org/

you might want this one instead (i think it's a bit newer). i forget why 
somebody else pushed that up there but anyway:

http://www.sustainablegis.com/projects/tz/testTZCFC.cfm



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333091
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateAdd value different on different servers

2010-04-22 Thread Tom McNeer

On Thu, Apr 22, 2010 at 1:37 PM, Judah McAuley  wrote:

>
> I'm planning on using timezone.cfc for a lot of my calendar-related
> functionality in the future due to these issues:
>

It's an excellent resource. I use it a good bit. But as I say, I just wasn't
aware of this particular issue, though your explanation makes perfect sense.


-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333090
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateAdd value different on different servers

2010-04-22 Thread Judah McAuley

I'm planning on using timezone.cfc for a lot of my calendar-related
functionality in the future due to these issues:

http://timezonecfc.riaforge.org/

Cheers,
Judah

On Thu, Apr 22, 2010 at 10:26 AM, Tom McNeer  wrote:
>
> Hi Judah,
>
> Yep. I understand. And the consistency is there. I just didn't know that
> dateAdd made the adjustment, though I knew Java knew the difference.
>
> And though it may have been discussed earlier on the list, I sure couldn't
> find it in all the Googling I did before I posted.
>
> Anyway, now that I understand what's happening, it's an easy workaround:
> getTimeZoneInfo().isDSTon.
>
>
> --
> Thanks,
>
> Tom
>
> Tom McNeer
> MediumCool
> http://www.mediumcool.com
> 1735 Johnson Road NE
> Atlanta, GA 30306
> 404.589.0560
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333089
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateAdd value different on different servers

2010-04-22 Thread Tom McNeer

Hi Judah,

Yep. I understand. And the consistency is there. I just didn't know that
dateAdd made the adjustment, though I knew Java knew the difference.

And though it may have been discussed earlier on the list, I sure couldn't
find it in all the Googling I did before I posted.

Anyway, now that I understand what's happening, it's an easy workaround:
getTimeZoneInfo().isDSTon.


-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333088
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateAdd value different on different servers

2010-04-22 Thread Judah McAuley

The issue has come up before on the list and here is the reasoning:

Take 5 a.m. on the day before DST kicks in. Then 5 a.m. on the day
that DST kicks in. Logically, you'd think that one day had elapsed.
Well, that's true if you are using a day as your unit of measurement,
but that isn't how Java does it. Ask yourself this question: how many
hours elapsed? Well, 5 a.m. on the first day until 2 a.m. on the next
day is 21 hours. But then the clocks jump forward to 3 a.m. The hour
between 2 and 3 a.m. never happens, it disappears. Then it counts from
3 a.m. to 5 a.m. which is another 2 hours. So 21 + 2 = 23 hours, not
24.  Down in the JVM, it is actually counting in milliseconds, not
hours, so the hour that is missing is actually 3,600,000 milliseconds,
but the principle is the same. When you ask Java "how many days have
elapsed from 5 am this day to 5 am the following day" and that spans
the time change, Java is going to reply 0 because a whole day has not
elapsed.

In your particular example, you have servers in two places, one that
observes daylight savings and one which does not. The difference you
are seeing is a result of that. Going back to my previous example,
lets take the server on the East Coast (that observes daylight
savings) and add 24 hours to the 5 a.m. time the day before the time
change. Internally, it adds 21 hours, hits 2 a.m. (when the time shift
happens and it is suddenly 3 a.m.), then adds 3 hours to 3 a.m. giving
you 6 a.m.

The same example in Arizona, where they don't observe daylight
savings: it adds 21 hours to get to 2 a.m., no time shift happens
because of daylight savings, so it then adds the other 3 hours and
gets 2 a.m. + 3 hours = 5 a.m.

Hence, adding the same number of time units to the same starting time
ends up producing two different resulting time values because one
server skips over a lost hour during the dst transition.

Confusing as hell, but internally consistent at least.

Cheers,
Judah

On Thu, Apr 22, 2010 at 9:35 AM, Tom McNeer  wrote:
>
> Okay,
>
> So - it wasn't a JVM issue. Updating it did not change the results.
>
> And Steve was right, in a way. But I still don't understand why it should be
> this way.
>
> First, Steve, I understand what you're saying about "whenever you display a
> time." But in practice, I'm not displaying a time at all. I'm simply
> creating a date/time value and adding a number of seconds to it, then
> inserting into a database.
>
> So to my way of thinking - and according to every doc I've ever read - the
> dateAdd function should do exactly what you tell it to do: just add the
> increments to the original date.
>
> But what's happening DOES involve DST - though not the time zone. I don't
> know why. It shouldn't. But it does, at least in CF9.
>
> Try this for yourself: Daylight Savings Time began at 2:00 AM Eastern on
> March 14, 2010. So run the following:
>
>    
>    
>    
>    
>
> myDate is two hours _before_ DST went into effect. On two different CF9
> servers, one on EDT, the other on CDT, the result for myDate2 was:
> {ts '2050-07-01 17:07:46'}
>
> Now change the createDate to (2010,3,15) - _after_ DST went into effect. On
> the same servers, the result was:
> {ts '2050-07-02 16:07:46'}
>
> The original date was changed by a day. But the result of the dateAdd
> statement changed by 23 hours.
>
> I wish I could test this on CF8 and/or 7, but the only servers with those
> versions to which I have access are in Arizona, where they don't use DST.
> Those servers return the 16:07:46 timestamp. But without having the machines
> set to DST, I can't tell if CF is acting differently or not.
>
> If someone has access to those versions on a DST machine, please try this
> and see what you get. I'd really be curious to know if this is a CF9 thing.
>
> Maybe I've just misunderstood how dateAdd works - although the docs simply
> say "Adds units of time to a date." There's no mention of DST affecting it.
> But it's certainly doing so.
>
> So in brief: when you dateAdd, the result will be affected by DST  - at
> least, based on whether your added timespan crosses the DST threshhold for
> the current year. I have no idea if it tries to figure out whether the
> resulting date/time is during DST or not.
>
> In most instances, this might not even be noticed. But in my case, where I'm
> receiving a timestamp from an external device as a Unix epoch time, then
> converting it to a date/time object by adding the epoch time to the date of
> 1/1/1970, the result is not what I want, since all I'm trying to do is
> recreate the time from the original device. The DST addition causes the
> timestamp to be wrong by an hour.
>
> Frustrating, but at least I now understand what's happening. Hope this will
> help someone else avoid the same frustration.
>
>
>
> --
> Thanks,
>
> Tom
>
> Tom McNeer
> MediumCool
> http://www.mediumcool.com
> 1735 Johnson Road NE
> Atlanta, GA 30306
> 404.589.0560
>
>
> 

~~~

Re: CRUD screens...

2010-04-22 Thread Nicholas Stein

I have been very pleased with CodeSmith.  I wrote a template that dives into a 
database and creates the 4 CRUD statements for every table in the database.  I 
am using SQL Server 2008, but it works with 2005 as well.  I would be glad to 
share the templates with you should you decide to use codesmith.

I also use CodeSmith to generate the CF Crud screens from the stored procs.  
The screens are very crude (pun intended), but are a starting place for your 
work.  

CodeSmith templates are pretty easy to modify if you know a little C#. 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333086
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateAdd value different on different servers

2010-04-22 Thread Tom McNeer

Okay,

So - it wasn't a JVM issue. Updating it did not change the results.

And Steve was right, in a way. But I still don't understand why it should be
this way.

First, Steve, I understand what you're saying about "whenever you display a
time." But in practice, I'm not displaying a time at all. I'm simply
creating a date/time value and adding a number of seconds to it, then
inserting into a database.

So to my way of thinking - and according to every doc I've ever read - the
dateAdd function should do exactly what you tell it to do: just add the
increments to the original date.

But what's happening DOES involve DST - though not the time zone. I don't
know why. It shouldn't. But it does, at least in CF9.

Try this for yourself: Daylight Savings Time began at 2:00 AM Eastern on
March 14, 2010. So run the following:






myDate is two hours _before_ DST went into effect. On two different CF9
servers, one on EDT, the other on CDT, the result for myDate2 was:
{ts '2050-07-01 17:07:46'}

Now change the createDate to (2010,3,15) - _after_ DST went into effect. On
the same servers, the result was:
{ts '2050-07-02 16:07:46'}

The original date was changed by a day. But the result of the dateAdd
statement changed by 23 hours.

I wish I could test this on CF8 and/or 7, but the only servers with those
versions to which I have access are in Arizona, where they don't use DST.
Those servers return the 16:07:46 timestamp. But without having the machines
set to DST, I can't tell if CF is acting differently or not.

If someone has access to those versions on a DST machine, please try this
and see what you get. I'd really be curious to know if this is a CF9 thing.

Maybe I've just misunderstood how dateAdd works - although the docs simply
say "Adds units of time to a date." There's no mention of DST affecting it.
But it's certainly doing so.

So in brief: when you dateAdd, the result will be affected by DST  - at
least, based on whether your added timespan crosses the DST threshhold for
the current year. I have no idea if it tries to figure out whether the
resulting date/time is during DST or not.

In most instances, this might not even be noticed. But in my case, where I'm
receiving a timestamp from an external device as a Unix epoch time, then
converting it to a date/time object by adding the epoch time to the date of
1/1/1970, the result is not what I want, since all I'm trying to do is
recreate the time from the original device. The DST addition causes the
timestamp to be wrong by an hour.

Frustrating, but at least I now understand what's happening. Hope this will
help someone else avoid the same frustration.



-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333085
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: DateAdd value different on different servers

2010-04-22 Thread DURETTE, STEVEN J (ATTASIAIT)

Yes I agree that it is just math, it is the output that is doing the
conversion.  The computers should be using Universal Time (Used to be
Greenwich Mean Time), but whenever you display a time it converts to the
local time zone. I know there is a way to display it in Universal time,
but I don't remember how at the moment.

Or maybe I missed something, but the fact that it is exactly one hour
off just screams time zone/daylight savings time difference.

Steve

-Original Message-
From: Tom McNeer [mailto:tmcn...@gmail.com] 
Sent: Thursday, April 22, 2010 9:17 AM
To: cf-talk
Subject: Re: DateAdd value different on different servers


Steve,

On Thu, Apr 22, 2010 at 8:47 AM, DURETTE, STEVEN J (ATTASIAIT) <
sd1...@att.com> wrote:

>
> I believe it is doing this because even though you are adding a
specific
> amount of seconds the system automatically knows to make adjustments
> based on its time zone or if it uses daylight savings time or not.


If dateAdd worked that way, you'd have to adjust for the server time
zone
constantly. It doesn't. It's just math.

I can confirm that two servers, both running CF9 on Windows Server 2008,
both in the Eastern time zone, both recognizing that Daylight Savings
Time
is in effect, are returning date/time values one hour apart.

Moreover, I can confirm that a server in the Central time zone, also
recognizing that Daylight Savings Time is in effect, returns a date/time
value that is the same as one of the EDT servers, and one hour _later_
(not
earlier) than one of the EDT servers.

After I've played with the JVMs, I'll report back.



-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333084
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateAdd value different on different servers

2010-04-22 Thread Tom McNeer

Steve,

On Thu, Apr 22, 2010 at 8:47 AM, DURETTE, STEVEN J (ATTASIAIT) <
sd1...@att.com> wrote:

>
> I believe it is doing this because even though you are adding a specific
> amount of seconds the system automatically knows to make adjustments
> based on its time zone or if it uses daylight savings time or not.


If dateAdd worked that way, you'd have to adjust for the server time zone
constantly. It doesn't. It's just math.

I can confirm that two servers, both running CF9 on Windows Server 2008,
both in the Eastern time zone, both recognizing that Daylight Savings Time
is in effect, are returning date/time values one hour apart.

Moreover, I can confirm that a server in the Central time zone, also
recognizing that Daylight Savings Time is in effect, returns a date/time
value that is the same as one of the EDT servers, and one hour _later_ (not
earlier) than one of the EDT servers.

After I've played with the JVMs, I'll report back.



-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333083
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: DateAdd value different on different servers

2010-04-22 Thread DURETTE, STEVEN J (ATTASIAIT)

I believe it is doing this because even though you are adding a specific
amount of seconds the system automatically knows to make adjustments
based on its time zone or if it uses daylight savings time or not.  So
even though you say ignore that, you can't because the system doesn't
ignore it.

Steve


-Original Message-
From: Tom McNeer [mailto:tmcn...@gmail.com] 
Sent: Wednesday, April 21, 2010 5:13 PM
To: cf-talk
Subject: Re: DateAdd value different on different servers


Thanks for the replies, but mainly they tell me that I've muddied the
water.

Let me try to be clearer:

I shouldn't have even mentioned the Unix value, because that's not
relevant.
Just forget that I'm getting a Unix value completely.

And I definitely should not have shown the time zones, because they
shouldn't be relevant.

So let me start over. Forget everything but the following:

First, I'm saying, "Create a date/time value for January 1, 1970."

myDate = createDate(1970,1,1)

That's going to result in an object that represents midnight on
1/1/1970.
Doesn't even matter that it's the epoch date.

Then I'm adding a number of seconds:

myDate2 = DateAdd('s',1271779666,myDate)

When these two values are dumped, two servers show the following:

{ts '1970-01-01 00:00:00'}

 {ts '2010-04-20 17:07:46'}

One server shows this:

{ts '1970-01-01 00:00:00'}

 {ts '2010-04-20 16:07:46'}
=

So - we're not dealing with time zones. We're simply creating date/time
values. Why does the result of the dateAdd function return different
values?

That's the real issue. Sorry for being so confusing before.


-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333082
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm