PaulH
Member since Dec 11, 2008
- Profile: /members/1453-paulh.htm
- Comments: 41
Recent Blog Comments By PaulH
-
Change In ColdFusion Date::getTime() Method In ColdFusion 10
Posted on May 26, 2014 at 11:54 PM
getTime is core java & should always work the same no matter the cf version. http://docs.oracle.com/javase/7/docs/api/java/util/Date.html#getTime ()... read more »
-
Change In ColdFusion Date::getTime() Method In ColdFusion 10
Posted on Oct 2, 2012 at 2:24 PM
@Ben, store the epoch offsets. if you need to use them on the server (and you can live w/cf's tz handling) you can re-constitute via datetimeObject.setTime(epoch offset). no fuss, no muss.... read more »
-
Change In ColdFusion Date::getTime() Method In ColdFusion 10
Posted on Oct 2, 2012 at 1:53 PM
@Ben, no, it should return epoch offset (as in the ms since 1-jan-1970) instead of a datetime. store that.... read more »
-
Change In ColdFusion Date::getTime() Method In ColdFusion 10
Posted on Oct 2, 2012 at 1:23 PM
@Ben, the epoch offset of that datetime (read that aloud & use a loud booming voice when you say "epoch" & do it in a crowded room). java epoch offset coming & going. passed & stored on the server, clients will convert to their tz. avoid DST changes, tz hell, etc.... read more »
-
Change In ColdFusion Date::getTime() Method In ColdFusion 10
Posted on Oct 2, 2012 at 12:53 PM
@Ben, why not just store the offset & be done with it? really helps to uncomplicate things. yeah decimal days has its uses, getting day differences is a breeze. @jan nice solution. that bug report reads like the problem is deep, dark & systemic. i don't let cf touch datetimes if i have to ... read more »
-
Change In ColdFusion Date::getTime() Method In ColdFusion 10
Posted on Oct 1, 2012 at 10:44 PM
@Ben, yes you can move the server to the UTC tz but you can also just store the epoch offsets & let the clients sort out their tz. i used to hate when the flash player did that but came to see the wisdom in that approach. i suppose JS has a way to go from epoch offset to local tz too. that's my... read more »
-
Change In ColdFusion Date::getTime() Method In ColdFusion 10
Posted on Oct 1, 2012 at 1:25 PM
i suspect that cf9 sees the converted datetime as if its in the server tz when it does a getTime(). its offset is UTC+7 here (in bangkok). so your example has broken some of the cardinal rules of tz handing w/cf: * cf considers all date-times to be in the server's timezone, cf doesn't care about y... read more »
-
Using ColdFusion's PrecisionEvaluate() Function To Perform Big Integer Math
Posted on Oct 27, 2010 at 12:28 PM
did i know about PrecisionEvaluate()? why yes i did ;-) http://bit.ly/9Pjgjm... read more »
-
Geocoding IP Addresses For Free Using IPInfoDB And ColdFusion
Posted on Sep 30, 2010 at 2:04 PM
@Ben, yes. that's how we did our geolocator: http://javainetlocator.sourceforge.net/ but it's woefully out-of-date, nigel's been flitting round the world & hasn't updated it it quite some time.... read more »
-
Geocoding IP Addresses For Free Using IPInfoDB And ColdFusion
Posted on Sep 29, 2010 at 10:58 PM
i think you can speed things up considerably using the original db (from maxmind) as a local binary file (don't bother w/the sql database approach, it's never as fast as the binary): http://www.maxmind.com/app/geolitecity... read more »
-
Resident Evil: Extinction Starring Milla Jovovich
Posted on Sep 12, 2010 at 12:18 AM
@Ben, it was done in proper 3D (ala avatar). i'll be seeing this one as well.... read more »
-
Finding The Distance Between Latitude / Longitude Locations In ColdFusion
Posted on Mar 15, 2010 at 1:26 PM
as i said, "routing". googlemaps work well enough, even here in thailand. if that's not good enough & you have better transport infrastructure data (which is probably the only reason it's not "good enough") have a look at postGIS/pgRouting. if you're lighting cigars w/ben franklins, look at ESRI... read more »
-
Ask Ben: Formatting A Date Span In ColdFusion
Posted on Jun 25, 2009 at 1:40 PM
@ciaran that's pretty funny, "if" i looked at the implementation examples. actually it's no more than what ben's done with his function but w/out all the brain sweat (it's really only 3-4 lines of code). while ben's only written a few lines of code, i imagine quite a bit of thought went into this. ... read more »
-
Ask Ben: Formatting A Date Span In ColdFusion
Posted on Jun 25, 2009 at 12:30 PM
too many cool java libs to ignore, might as well try to stop a freight train by winking at it.... read more »
-
Ask Ben: Formatting A Date Span In ColdFusion
Posted on Jun 25, 2009 at 12:11 PM
or you know, use icu4j's dateIntervalFormat class: http://icu-project.org/apiref/icu4j/com/ibm/icu/text/DateIntervalFormat.html... read more »
-
Converting To GMT And From GMT In ColdFusion For Use With HTTP Time Stamps
Posted on Jun 2, 2009 at 1:25 PM
@kinky ben not "getting" tz & DST is a bad habit & *will* come back to bite your ankles off eventually. kind of like not var scoping your variables in a CFC. DST is also a moving target controlled by knucklehead politicians, it can come & go on a whim (or major sporting event, ask the ozzies). comp... read more »
-
Converting To GMT And From GMT In ColdFusion For Use With HTTP Time Stamps
Posted on Jun 2, 2009 at 8:08 AM
@kinky ben "GMT is used simply to allow a standardized time storage format" uh, no (but nice try sweeping away 200+ years of history & culture). it was originally used to help maritime brits (you know "iron men, wooden ships") calculate longitude. greenwich (the "G" in GMT) was zero degrees longitud... read more »
-
Converting To GMT And From GMT In ColdFusion For Use With HTTP Time Stamps
Posted on May 27, 2009 at 9:36 AM
@ben look around the room, red fellow w/horns & a pitchfork? man you've fallen into tz hell for sure. the offset should handle the direction. here in bangkok we're UTC+7 (ICT), so to get back to UTC i'd subtract 7. for tz America/Dawson_Creek (UTC-7) i'd still subtract but since the UTC offset is ... read more »
-
Converting To GMT And From GMT In ColdFusion For Use With HTTP Time Stamps
Posted on May 26, 2009 at 1:58 PM
ben on cf8 & above it will automagically rollover to DST (ie 3:01 AM) even if your intention is that it's UTC or whatever non-DST tz. if you let cf mess w/your datetimes (dateAdd, etc.) it will chomp them into its own tz. and maybe because i've been dealing with tz & offsets all day & my head is ... read more »
-
Converting To GMT And From GMT In ColdFusion For Use With HTTP Time Stamps
Posted on May 26, 2009 at 11:16 AM
assuming your server's tz has DST what does this give you? <cfscript> t=createDateTime(2006,4,2,2,1,0); writeoutput("#t#"); </cfscript> if i remember rightly, cf7 (on a server w/DST) would just barf.... read more »