<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>timestamp &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/timestamp/</link>
	<description>Feed of posts on WordPress.com tagged "timestamp"</description>
	<pubDate>Thu, 26 Nov 2009 13:21:03 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[HISTTIMEFORMAT: add execution time to Linux's history file]]></title>
<link>http://mohammednv.wordpress.com/2009/11/07/histtimeformat-add-execution-time-to-linuxs-history-file/</link>
<pubDate>Sat, 07 Nov 2009 08:32:23 +0000</pubDate>
<dc:creator>Mohammed</dc:creator>
<guid>http://mohammednv.wordpress.com/2009/11/07/histtimeformat-add-execution-time-to-linuxs-history-file/</guid>
<description><![CDATA[As you might know, Linux logs all the commands executed on a shell prompt to its history file. The f]]></description>
<content:encoded><![CDATA[As you might know, Linux logs all the commands executed on a shell prompt to its history file. The f]]></content:encoded>
</item>
<item>
<title><![CDATA[How to get Current Date and Time in SQL]]></title>
<link>http://zaheedk.wordpress.com/2009/10/27/how-to-get-current-date-and-time-in-sql/</link>
<pubDate>Tue, 27 Oct 2009 10:43:59 +0000</pubDate>
<dc:creator>zaheedk</dc:creator>
<guid>http://zaheedk.wordpress.com/2009/10/27/how-to-get-current-date-and-time-in-sql/</guid>
<description><![CDATA[Ever wondered that how can I get the current Date and Time in SQL, just the way we dot in VB.Net usi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ever wondered that how can I get the current Date and Time in SQL, just the way we dot in VB.Net using Date.now. Well it is more simple than you thought</p>
<p>Use T-SQL command CURRENT_TIMESTAMP</p>
<p>This will return the current date and time value without the database time zone offset.</p>
<p>How do i use it? It&#8217;s very simple&#8230;&#8230;</p>
<p>Select CURRENT_TIMESTAMP (returns the current date and time)</p>
<p>Update table1 set ddate = CURRENT_TIMESTAMP (updates table1 and sets value of field ddate to current date and time)</p>
<p>Hope you find this article useful&#8230;. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&#160;</p>
<p>&#160;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Is your physical model "XML ready"?]]></title>
<link>http://stefanoravec.wordpress.com/2009/10/26/is-your-physical-model-xml-ready/</link>
<pubDate>Mon, 26 Oct 2009 14:02:23 +0000</pubDate>
<dc:creator>stefanoravec</dc:creator>
<guid>http://stefanoravec.wordpress.com/2009/10/26/is-your-physical-model-xml-ready/</guid>
<description><![CDATA[drop table t; drop view v; create table t (t timestamp); insert into t values (current_timestamp); c]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><code></p>
<pre>
drop table t;
drop view v;
create table t (t <font color="red">timestamp</font>);
insert into t values (current_timestamp);
commit;
create view v as select xmlforest(t) x from t;

alter session set nls_language='AMERICAN';
alter session set nls_territory='AMERICA';
select * from v;
<font color="red">X
-------------------------------------------
2009-10-26T14:51:58.916436
</font>

alter session set nls_language='CZECH';
alter session set nls_territory='CZECH REPUBLIC';
select * from v;
<font color="red">
Error report:
SQL Error: ORA-01877: pro vnitřní vyrovnávací paměť je řetězec příliš dlouhý
01877. 00000 -  "string is too long for internal buffer"
*Cause:    This is an internal error.
*Action:   Please contact Oracle Worldwide Support.
</font>

truncate table t;
alter table t modify(t <font color="red">timestamp with local time zone</font>);
insert into t values (current_timestamp);
commit;

alter session set nls_language='CZECH';
alter session set nls_territory='CZECH REPUBLIC';
select * from v;
<font color="red">X
-------------------------------------------
2009-10-26T14:51:59.086511+01:00
</font>

alter session set nls_language='AMERICAN';
alter session set nls_territory='AMERICA';
select * from v;

<font color="red">X
-------------------------------------------
2009-10-26T14:51:59.086511+01:00
</font>
</pre>
<p></code></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[jQuery Plugin: It's CuteTime!]]></title>
<link>http://tpgblog.com/2009/10/26/jquery-plugin-its-cutetime/</link>
<pubDate>Mon, 26 Oct 2009 13:45:07 +0000</pubDate>
<dc:creator>Jeremy Horn</dc:creator>
<guid>http://tpgblog.com/2009/10/26/jquery-plugin-its-cutetime/</guid>
<description><![CDATA[Many online social products, and more continue to, avoid a formal timestamp format&#8230; 2009-10-10]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://theproductguy.files.wordpress.com/2009/10/jquerylogo256.jpg"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;margin:10px;" title="jquery-logo-256" src="http://theproductguy.files.wordpress.com/2009/10/jquerylogo256_thumb.jpg?w=114&#038;h=114" border="0" alt="jquery-logo-256" width="114" height="114" align="left" /></a> <a href="http://theproductguy.files.wordpress.com/2009/10/02_facebookcutetime1.jpg"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;margin:0 0 10px 10px;" title="02_facebook-cutetime" src="http://theproductguy.files.wordpress.com/2009/10/02_facebookcutetime_thumb1.jpg?w=158&#038;h=303" border="0" alt="02_facebook-cutetime" width="158" height="303" align="right" /></a> Many online social products, and more continue to, avoid a formal timestamp format&#8230;</p>
<p align="center"><em><strong>2009-10-10 23:14:17</strong></em><em> </em>and <strong><em>Thu, October 29, 2004 12:14:19 PM</em></strong></p>
<p>&#8230; opting for more user friendly, &#8220;warm and fuzzy,&#8221; human-readable styles&#8230;</p>
<p align="center"><strong><em>9 days ago</em></strong> and <em><strong>5 years ago</strong></em>.</p>
<p>As a result, and also in my quest to always help provide my clients free, cheap and easy to use tools, I have been on the lookout for a <a href="http://jquery.com/">jQuery</a> plugin that would provide the ability to easily&#8230;<a href="http://theproductguy.files.wordpress.com/2009/10/01_diggcutetime1.jpg"><img class="alignright" style="border:0 none;display:block;margin:10px 0 10px 10px;" title="01_digg-cutetime" src="http://theproductguy.files.wordpress.com/2009/10/01_diggcutetime_thumb1.jpg?w=330&#038;h=160" border="0" alt="01_digg-cutetime" width="330" height="160" /></a></p>
<ul>
<li>convert timestamps to &#8216;cuter&#8217; language-styled forms (e.g. yesterday, 2 hours ago, last year, in the future!),</li>
<li>customize the time scales and output formatting, and</li>
<li>dynamically update the displayed CuteTime(s) upon request and/or automatically.</li>
</ul>
<p>While there are other similar tools out there in <a href="http://ejohn.org/blog/javascript-pretty-date/">JavaScript</a>, <a href="http://www.zachleat.com/web/2008/02/10/php-pretty-date/">PHP</a>, and, I am sure, many other languages, none adequately met my goals. Therefore, I created the jQuery <a href="http://github.com/theproductguy/CuteTime/"><strong>CuteTime</strong></a> plugin.</p>
<h2><strong>Usage</strong></h2>
<p>CuteTime is a customizable jQuery plugin (jQuery.cuteTime) that automatically converts timestamps to formats much cuter. Also, it has the ability to dynamically re-update and/or automatically update timestamps on a controlled interval.</p>
<p><strong>As a Function</strong></p>
<p>If used as a function, a string containing a cuteTime version of the provided timestamp is returned.</p>
<pre class="brush: jscript;">
$(document).ready(function () {
	// timestamp MUST be a valid Date().parse 'able' format
	$.cuteTime('2009/10/12 22:11:19');
});
</pre>
<pre class="brush: xml;">
&#60;html&#62;
	&#60;body&#62;
		&#60;div class='predetermined'&#62;&#60;/div&#62;
	&#60;/body&#62;
&#60;/html&#62;
</pre>
<p><strong><br />
As a Method</strong></p>
<p>If used via Selector, CuteTime replaces the text of the provided object with a cuteTime.</p>
<pre class="brush: jscript;">
$(document).ready(function () {
	$('.timestamp').cuteTime();
});
</pre>
<pre class="brush: xml;">
&#60;html&#62;
	&#60;body&#62;
		&#60;div class=&#34;timestamp&#34;&#62;
			2009/10/12 22:11:19
		&#60;/div&#62;
		&#60;div class=&#34;timestamp&#34;&#62;
			2008/11/01 07:11:00
		&#60;/div&#62;
		&#60;div class=&#34;timestamp&#34;&#62;
			2018/11/01 07:11:00
		&#60;/div&#62;
		&#60;div class=&#34;timestamp&#34;&#62;&#60;/div&#62;
		&#60;div class=&#34;timestamp&#34; cutetime=&#34;1980/10/12 22:11:19&#34;&#62;
			2009/10/12 22:11:19
		&#60;/div&#62;
		&#60;div class=&#34;timestamp&#34; cutetime=&#34;asd&#34;&#62;
			10/12/2009 22:11:19
		&#60;/div&#62;
		&#60;div class=&#34;timestamp&#34; cutetime=&#34;asd&#34;&#62;
			aoisd
		&#60;/div&#62;
		&#60;div class=&#34;timestamp&#34; cutetime=&#34;asd&#34;&#62;&#60;/div&#62;
	&#60;/body&#62;
&#60;/html&#62;
</pre>
<p>When initialized, the cuteTime() call either updates or assigns the &#8216;cutetime&#8217; attribute to the provided objects. Method implementation supports chaining, returning the jQuery object.</p>
<p style="padding-left:30px;">e.g. &#60;div class=&#8217;timestamp&#8217; cutetime=&#8217;2009 10 12 22:11:19&#8242;&#62;2009 10 12 22:11:19&#60;/div&#62;</p>
<p>If the cutetime attribute already exists within the provided object, then the text within the object is ignored in the cutification process. If the cutetime attribute does not exist or an invalid one is provided, then a valid cutetime attribute is assigned to the object.</p>
<p>If the cutetime attribute is missing, then it is calculated from the text of the provided object.</p>
<p>If neither cutetime attribute nor valid object text exist, then the timestamp is assumed to be &#8216;now&#8217;.</p>
<p>When using CuteTime in the form&#8230;</p>
<pre class="brush: jscript;">&#60;br /&#62;
$(document).ready(function () {
	remember_the_cuteness = $('.timestamp').cuteTime();
});
</pre>
<p>&#8230; the following methods can be used &#8230;</p>
<pre class="brush: jscript;">
// stops all automatic updates of refresh-enabled timestamps
remember_the_cuteness.stop_cuteness();

// (re)starts the automatic updating of timestamps
// REMINDER: make sure refresh is set to &#62; 0
remember_the_cuteness.start_cuteness();

// updates timestamps of the provided objects
remember_the_cuteness.update_cuteness();
</pre>
<h2><strong>Settings</strong></h2>
<p>By default, automatic updating is <strong><em>disabled</em></strong> and the following CuteTimes can be displayed&#8230;</p>
<p style="padding-left:60px;">the future!<br />
just now<br />
a few seconds ago<br />
a minute ago<br />
<em><strong>x</strong></em> minutes ago<br />
an hour ago<br />
<em><strong>x</strong></em> hours ago<br />
yesterday<br />
<em><strong>x</strong></em> days ago<br />
last month<br />
<em><strong>x</strong></em> months ago<br />
last year<br />
<em><strong>x</strong></em> years ago</p>
<p>To change these settings, they can either be accessed directly&#8230;</p>
<pre class="brush: jscript;">
$.fn.cuteTime.settings.refresh = 10000;
</pre>
<p>&#8230; or at the time of initialization &#8230;</p>
<pre class="brush: jscript;">
my_cutetime = $('.timestamp_move').cuteTime({ refresh: 60000*10 });
</pre>
<p>The default settings data structure is&#8230;</p>
<pre class="brush: jscript;">
$.fn.cuteTime.settings = {
	refresh: -1,			// time in milliseconds before next refresh of page data; -1 == no refresh
	time_ranges: [
		{bound: NEG_INF,	// IMPORANT: bounds MUST be in ascending order, from negative infinity to positive infinity
			cuteness: 'the future!',			unit_size: 0},
		{bound: 0,
			cuteness: 'just now',				unit_size: 0},
		{bound: 20 * 1000,
			cuteness: 'a few seconds ago',		unit_size: 0},
		{bound: 60 * 1000,
			cuteness: 'a minute ago',			unit_size: 0},
		{bound: 60 * 1000 * 2,
			cuteness: ' minutes ago',			unit_size: 60 * 1000},
		{bound: 60 * 1000 * 60,
			cuteness: 'an hour ago',			unit_size: 0},
		{bound: 60 * 1000 * 60 * 2,
			cuteness: ' hours ago',				unit_size: 60 * 1000 * 60},
		{bound: 60 * 1000 * 60 * 24,
			cuteness: 'yesterday',				unit_size: 0},
		{bound: 60 * 1000 * 60 * 24 * 2,
			cuteness: ' days ago',				unit_size: 60 * 1000 * 60 * 24},
		{bound: 60 * 1000 * 60 * 24 * 30,
			cuteness: 'last month',				unit_size: 0},
		{bound: 60 * 1000 * 60 * 24 * 30 * 2,
			cuteness: ' months ago',			unit_size: 60 * 1000 * 60 * 24 * 30},
		{bound: 60 * 1000 * 60 * 24 * 30 * 12,
			cuteness: 'last year',				unit_size: 0},
		{bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2,
			cuteness: ' years ago',				unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
		{bound: POS_INF,
			cuteness: 'a blinkle ago',			unit_size: 0}
	]
};
</pre>
<p>The parameters are defined (and all can be overridden) thus&#8230;</p>
<ul>
<li><strong><em>refresh</em></strong>
<ul>
<li>time in milliseconds before next refresh of page data;</li>
<li>a value of -1 disables refreshing</li>
</ul>
</li>
</ul>
<ul>
<li><strong><em>time_ranges</em></strong>
<ul>
<li>the array of bound_structures that delineate the cute descriptions associated with time_ranges</li>
<li>time_range&#8217;s <strong>boundary structures</strong> consist of the following variables&#8230;</li>
</ul>
</li>
</ul>
<ul>
<li><strong><em>time_range[x].bound</em></strong>
<ul>
<li>the value is an integer representing the time difference between the provided timestamp and <em>now</em></li>
<li>the lower inclusive bound, or starting point, for using the &#8216;cuteness&#8217; string that describes the current timestamp</li>
<li>the exclusive upper bound is defined by the next boundary structure definition in the time_ranges array [current boundary + 1]</li>
</ul>
</li>
</ul>
<ul>
<li><strong><em>time_range[x].cuteness</em></strong>
<ul>
<li>string to use in place of the current timestamp (e.g. &#8216;yesterday&#8217;)</li>
</ul>
</li>
</ul>
<ul>
<li><strong><em>time_range[x].unit_size</em></strong>
<ul>
<li>the integer divisor in milliseconds to apply to the calculated time difference</li>
<li>if unit_size &#62; 0 then a number value is prepended to the cuteness string as calculated by time_difference / unit_size (e.g. 4 hours ago)</li>
<li>if unit_size = 0, then no number is prepended to the cuteness string (e.g. an hour ago)</li>
</ul>
</li>
</ul>
<h2><strong>BTW</strong></h2>
<p>Make sure you use timestamps that are fully recognized by the JavaScript Date object&#8217;s Parse method in all the IE and FF browser versions you want to support.  Otherwise, prepare for a headache. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<h2><strong>Get It</strong></h2>
<p>You can download CuteTime, dual licensed under <strong>GPL</strong> and <strong>MIT</strong>, from&#8230;</p>
<p style="padding-left:30px;"><strong><em>jQuery Repository</em></strong><br />
<a href="http://plugins.jquery.com/project/CuteTime" target="_blank">http://plugins.jquery.com/project/CuteTime</a></p>
<p style="padding-left:30px;"><strong><em>Git</em></strong><br />
Public Clone URL:   <a href="//github.com/theproductguy/CuteTime.git">git://github.com/theproductguy/CuteTime.git</a><br />
GitHub: <a href="http://github.com/theproductguy/CuteTime">http://github.com/theproductguy/CuteTime</a></p>
<p style="padding-left:30px;"><strong><em>Zip</em></strong><br />
<a href="http://plugins.jquery.com/files/jQuery.cuteTime_source-bundle_1.0_20091019.zip">jQuery.cuteTime_source-bundle_1.0_20091019.zip</a></p>
<h2><strong>Demo</strong></h2>
<p><a href="http://theproductguy.com/cutetime/cutetime.demo.html" target="_blank">http://theproductguy.com/cutetime/cutetime.demo.html</a></p>
<p>Status updates can be found here, <a href="http://tpgblog.com/cutetime/">jQuery CuteTime</a>.<em><br />
If you find this useful, or have any questions, ideas, or issues, <strong>leave a comment</strong>.<br />
</em></p>
<p>Enjoy!</p>
<p>Jeremy Horn<br />
The Product Guy</p>
<table style="border:1px solid #e7e7e7;font-size:9pt;color:#999;padding:5px;" border="0" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td>Add to Social Bookmarks:</td>
<td width="20"><a rel="nofollow" href="http://www.stumbleupon.com/submit?url=http://tpgblog.com/2009/10/26/jquery-plugin-cutetime/&#38;title=jQuery Plugin: It's CuteTime!"><img src="http://theproductguy.wordpress.com/files/2008/04/su.png" border="0" alt="Stumbleupon" width="16" height="16" /></a></td>
<td width="20"><a rel="nofollow" href="http://del.icio.us/post?url=http://tpgblog.com/2009/10/26/jquery-plugin-cutetime/&#38;title=jQuery Plugin: It's CuteTime!"><img src="http://theproductguy.wordpress.com/files/2008/04/delicious.png" border="0" alt="Del.ico.us" width="16" height="16" /></a></td>
<td width="20"><a rel="nofollow" href="http://furl.net/storeIt.jsp?t=jQuery Plugin: It's CuteTime!&#38;u=http://tpgblog.com/2009/10/26/jquery-plugin-cutetime/"><img src="http://theproductguy.wordpress.com/files/2008/04/furl.gif" border="0" alt="Furl" width="16" height="16" /></a></td>
<td width="20"><a rel="nofollow" href="http://reddit.com/submit?url=http://tpgblog.com/2009/10/26/jquery-plugin-cutetime/&#38;title=jQuery Plugin: It's CuteTime!"><img src="http://theproductguy.wordpress.com/files/2008/04/reddit.gif" border="0" alt="Reddit" width="16" height="16" /></a></td>
<td width="20"><a rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&#38;output=popup&#38;bkmk=http://tpgblog.com/2009/10/26/jquery-plugin-cutetime/"><img src="http://theproductguy.wordpress.com/files/2008/04/goog.png" border="0" alt="Google" width="16" height="16" /></a></td>
<td width="20"><a rel="nofollow" href="http://www.mixx.com/submit?page_url='+http://tpgblog.com/2009/10/26/jquery-plugin-cutetime/"><img src="http://www.mixx.com/images/buttons/mixx-button4.png" alt="Add to Mixx!" width="16" height="16" /></a></td>
</tr>
</tbody>
</table>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Linux Rename using Modified Date]]></title>
<link>http://neilobremski.wordpress.com/2009/10/22/linux-rename-using-modified-date/</link>
<pubDate>Thu, 22 Oct 2009 20:50:20 +0000</pubDate>
<dc:creator>Neil Obremski</dc:creator>
<guid>http://neilobremski.wordpress.com/2009/10/22/linux-rename-using-modified-date/</guid>
<description><![CDATA[I know I&#8217;m going to forget how I did this again, especially if I lose the following script I w]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I know I&#8217;m going to forget how I did this again, especially if I lose the following script I wrote, so I&#8217;m posting it here.  Here&#8217;s the gist: a directory full of files and I want to to copy them to a new location while also changing them to lower-case, using a different extension (MOD =&#62; mpg), and finally <em>including the Last Modified</em> date in the name (YYMMDD-hhmmss).</p>
<blockquote>
<pre>#! /bin/bash
for file in $1/*.MOD
do
   modifdate=`stat -c %y $file`
   formatdate=`date -d "$modifdate" "+%Y%m%d-%0k%M%S"`
   echo "cp -p -u $file $2/mov-$formatdate.mpg"
   cp -p -u $file $2/mov-$formatdate.mpg
done</pre>
</blockquote>
<p>Note to myself: you called it <strong>movcp</strong> and put it in <tt>/usr/bin</tt>.  Thus I go from this &#8230;</p>
<div id="attachment_383" class="wp-caption aligncenter" style="width: 460px"><a href="http://neilobremski.wordpress.com/files/2009/10/fs100-video-files.png"><img class="size-full wp-image-383" title="Canon FS100 native directory listing" src="http://neilobremski.wordpress.com/files/2009/10/fs100-video-files.png" alt="Raw video files from SD card for my Canon FS100" width="450" height="370" /></a><p class="wp-caption-text">Raw video files from SD card for my Canon FS100</p></div>
<p>Using this &#8230;</p>
<div id="attachment_384" class="wp-caption aligncenter" style="width: 460px"><a href="http://neilobremski.wordpress.com/files/2009/10/movcp.png"><img class="size-full wp-image-384" title="movcp" src="http://neilobremski.wordpress.com/files/2009/10/movcp.png" alt="Linux script copying files off Canon FS100 SD and adding timestamp to their name." width="450" height="313" /></a><p class="wp-caption-text">Linux script copying files off Canon FS100 SD and adding timestamp to their name.</p></div>
<p>To this:</p>
<div id="attachment_385" class="wp-caption aligncenter" style="width: 460px"><a href="http://neilobremski.wordpress.com/files/2009/10/fs100-renamed.png"><img class="size-full wp-image-385" title="Renamed to *.mpg" src="http://neilobremski.wordpress.com/files/2009/10/fs100-renamed.png" alt="Canon FS100 files are just MPEG-2 without proper aspect ratio header set" width="450" height="288" /></a><p class="wp-caption-text">Canon FS100 files are just MPEG-2 without proper aspect ratio header set</p></div>
<p><em>Voila!</em> Now I can archive these off to my <a href="http://www.amazon.com/gp/product/B0029U2E4E?ie=UTF8&#38;tag=neiscstu&#38;linkCode=as2&#38;camp=1789&#38;creative=390957&#38;creativeASIN=B0029U2E4E">ReadyNAS</a> and <a href="http://adrive.com/">online backup</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Change in behavior in Timestamp.valueOf() in JDK 6]]></title>
<link>http://vijaydev.wordpress.com/2009/10/21/change-in-behavior-in-timestamp-valueof-in-jdk-6/</link>
<pubDate>Wed, 21 Oct 2009 17:56:43 +0000</pubDate>
<dc:creator>Vijay Dev</dc:creator>
<guid>http://vijaydev.wordpress.com/2009/10/21/change-in-behavior-in-timestamp-valueof-in-jdk-6/</guid>
<description><![CDATA[Recently, when looking at a bug related to Timestamp, I found out that the valueOf() method in java.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Recently, when looking at a bug related to Timestamp, I found out that the valueOf() method in java.sql.Timestamp works differently in JDK 6 than the earlier versions.</p>
<p>Timestamp.valueOf(), when provided with a timestamp which contains a date or a month with a single digit. eg. 2009-9-20, 2009-9-3, 2009-12-4 etc., behaves differently in JDK 6 &#8211; it throws an IllegalArgumentException saying that the timestamp is not properly formatted. Whereas JDK 5 (and earlier versions) works just fine providing the proper values with &#8216;0&#8242; prefixed to those single digit numbers. However JDK 6 is fine with hours, minutes, seconds being single digits. As usual, got curious and started exploring why this happens by looking at the source code for the Timestamp class in JDK 5 and 6.</p>
<p>Here&#8217;s the JDK 6 Timestamp.valueOf() snippet:</p>
<blockquote><p>int counterD = 0;<br />
<strong>int intDate[] = {4,2,2};</strong></p>
<p>int counterT = 0;<br />
int intTime[] = {2,2,12};</p>
<p>while(stringTokeninzerDate.hasMoreTokens()) {<br />
String tokenDate = stringTokeninzerDate.nextToken();<br />
<strong>if(tokenDate.length() != intDate[counterD] ) {</strong><br />
throw new java.lang.IllegalArgumentException(formatError);<br />
}<br />
counterD++;<br />
}</p>
<p><strong>/*</strong><br />
//Commenting this portion out for checking of time</p>
<p>while(stringTokeninzerTime.hasMoreTokens()) {<br />
String tokenTime = stringTokeninzerTime.nextToken();</p>
<p>if (counterT &#60; 2 &#38;&#38; tokenTime.length() != intTime[counterT]  ) {<br />
throw new java.lang.IllegalArgumentException(formatError);<br />
}<br />
counterT++;<br />
}<br />
<strong>*/</strong></p></blockquote>
<p>The code in bold shows that there is a strict check on the length of the digits that constitute the datepart of the timestamp. The commented out source is the reason why the format of the digits in the time part is not strictly enforced.</p>
<p>I thought it&#8217;s good to dig more into this and asked in Stack Overflow and people helped out in identifying more details: The behaviour is already filed as a <a href="http://bugs.sun.com/view_bug.do?bug_id=6763465" target="_blank">bug</a> and more info about the bug was found <a href="http://bugs.sun.com/view_bug.do?bug_id=5006540" target="_blank">here</a>. A workaround for this problem is available <a href="http://forums.sun.com/thread.jspa?threadID=5339666" target="_blank">here</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Dates in PHP &amp; MySQL]]></title>
<link>http://chimpy.wordpress.com/2009/10/01/dates-in-php-mysql/</link>
<pubDate>Thu, 01 Oct 2009 11:37:37 +0000</pubDate>
<dc:creator>Mr Chimp</dc:creator>
<guid>http://chimpy.wordpress.com/2009/10/01/dates-in-php-mysql/</guid>
<description><![CDATA[It took me a while to get my head around usign dates in PHP and MySQL but it&#8217;s actually quite ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>It took me a while to get my head around usign dates in PHP and MySQL but it&#8217;s actually quite simple. I&#8217;m not sure what order to talk about this in so I&#8217;ll just go ahead and ramble.</p>
<p><strong>NOW()</strong><br />
The MySQL NOW() function can be used in an SQL string to insert the current date and time into a field. Like this:</p>
<pre class="brush: sql;">
INSERT INTO dates (the_date) VALUES (NOW())
</pre>
<p>Pretty straight forward but very useful. Of course you can also set the &#8220;on update CURRENT_TIMESTAMP&#8221; option in MySQL so that any time the record is altered the timestamp will be updated with the current time. This is useful for &#8220;last modified&#8221; attributes on things like blog posts.</p>
<p><strong>Timestamps</strong><br />
Timestamps are the number of seconds since a given time. Unix timestamps are the number of seconds since 01-01-1970 00:00:00. They&#8217;re good for computers but basically unreadable by humans.</p>
<p>Some of PHPs date functions take a timestamp as an argument so while they&#8217;re a little confusing and you&#8217;re bound to need them at some point.</p>
<p>Personally I think a nicely formatted string like &#8220;20091001124212&#8243; could make life a whole lot easier but there&#8217;s reasons why it doesn&#8217;t work like that, so just get used to timestamps!</p>
<p><strong>mktime()</strong><br />
<a href="http://php.net/manual/en/function.mktime.php">PHP Manual Page</a> &#8211; <a href="http://www.w3schools.com/php/func_date_mktime.asp">W3Schools Page</a></p>
<p>An easy way to make a timestamp is the mktime (aka <strong>M</strong>a<strong>K</strong>e <strong>TIME</strong>stamp) function in PHP. The basic syntax is as follows:</p>
<pre class="brush: sql;">mktime(hour, min, sec, month, day, year[, is_dst])</pre>
<p>It&#8217;s pretty straight forward, just stick the appropriate numbers in one end and a timestamp falls out the other. The is_dst means &#8220;is daylight saving time&#8221; which should be used if your PHP version is less than 5.</p>
<p>You can do date addition/subtraction with this function, too. For example:<br />
<code>mktime(0, 0, 0, date("m"), date("d")+100, date("y"))</code><br />
would give you a timestamp for 100 days in the future.</p>
<p>NOTE:<br />
Mktime() will spazz out if you give it values with leading zeros. For example the year 09 would be interpreted as 0. The solution? Make sure you don&#8217;t use leading zeros. For the year value, try to use four digit numbers to avoid ambiguity.</p>
<p><strong>date()</strong><br />
<a href="http://php.net/manual/en/function.date.php">PHP Manual Page</a> &#8211; <a href="http://www.w3schools.com/php/func_date_date.asp">W3Schools Page</a><br />
The date() function formats a date/time in the format of your choice. It takes one or two arguments: date($format_string[, $timestamp]). If $timestamp is not given the current time is used. The format string is made up of special characters, each of which denotes a way of displaying the hour or minute or month etc. For example &#8216;d/m/y&#8217; would give you (at the time of writing) 01/10/09. A complete list of available special characters follows:</p>
<ul>
<li>d &#8211; Day of month (01 &#8211; 31)</li>
<li>D &#8211; Day as text (three letters)</li>
<li>j &#8211; Day of month, no leading zeros (1 to 31)</li>
<li>l (lowercase &#8216;L&#8217;) &#8211; Day, full text</li>
<li>N &#8211; The ISO-8601 numeric representation of a day (1 for Monday through 7 for Sunday)</li>
<li>S &#8211; The English ordinal suffix for the day of the month (2 characters st, nd, rd or th. Works well with j)</li>
<li>w &#8211; A numeric representation of the day (0 for Sunday through 6 for Saturday)</li>
<li>z &#8211; The day of the year (from 0 through 365)</li>
<li>W &#8211; The ISO-8601 week number of year (weeks starting on Monday)</li>
<li>F &#8211; A full textual representation of a month (January &#8211; December)</li>
<li>m &#8211; month number (01 &#8211; 12)</li>
<li>M &#8211; A short textual representation of a month (jan &#8211; dec)</li>
<li>n &#8211; Month number no leading zeros (1 to 12)</li>
<li>t &#8211; The number of days in month</li>
<li>L &#8211; Leap year (1 if leap year, 0 otherwise)</li>
<li>o &#8211; The ISO-8601 year number</li>
<li>Y &#8211; Year, four digits (2009)</li>
<li>y &#8211; A two digit representation of a year (09)</li>
<li>a &#8211; Lowercase am or pm</li>
<li>A &#8211; Uppercase AM or PM</li>
<li>B &#8211; Swatch Internet time (000 to 999)</li>
<li>g &#8211; 12-hour hour (1 to 12)</li>
<li>G &#8211; 24-hour hour (0 to 23)</li>
<li>h &#8211; 12-hour hour (01 to 12)</li>
<li>H &#8211; 24-hour hour (00 to 23)</li>
<li>i &#8211; Minutes, leading zeros (00 to 59)</li>
<li>s &#8211; Seconds, leading zeros (00 to 59)</li>
<li>e &#8211; The timezone identifier (Examples: UTC, Atlantic/Azores)</li>
<li>I (capital i) &#8211; Daylights savings time (1 if Daylight Savings Time, 0 otherwise)</li>
<li>O &#8211; Difference to Greenwich time (GMT) in hours (Example: +0100)</li>
<li>T &#8211; Timezone setting of the PHP machine (Examples: EST, MDT)</li>
<li>Z &#8211; Timezone offset in seconds. The offset west of UTC is negative, and the offset east of UTC is positive (-43200 to 43200)</li>
<li>c &#8211; The ISO-8601 date (e.g. 2004-02-12T15:19:21+00:00)</li>
<li>r &#8211; The RFC 2822 formatted date (e.g. Thu, 21 Dec 2000 16:01:07 +0200)</li>
<li>U &#8211; The seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)</li>
</ul>
<p><strong>strtotime()</strong><br />
This PHP function takes a string written in normal English and attempts to convert it into a timestamp. For example:</p>
<pre class="brush: php;">
strtotime('next Thursday');
strtotime('+7 hours');
strtotime('+1 week');
</pre>
<p>On failure function returns false on PHP5 and -1 on earlier versions.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
For a full list of PHP date/time functions check out the <a href="http://www.w3schools.com/PHP/php_ref_date.asp">w3schools page.</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[DBA_HIST_DATABASE_INSTANCE]]></title>
<link>http://oraclespin.wordpress.com/2009/09/29/dba_hist_database_instance/</link>
<pubDate>Wed, 30 Sep 2009 04:12:30 +0000</pubDate>
<dc:creator>Amin Jaffer</dc:creator>
<guid>http://oraclespin.wordpress.com/2009/09/29/dba_hist_database_instance/</guid>
<description><![CDATA[In 10g there is a view called DBA_HIST_DATABASE_INSTANCE which has database instance information. It]]></description>
<content:encoded><![CDATA[In 10g there is a view called DBA_HIST_DATABASE_INSTANCE which has database instance information. It]]></content:encoded>
</item>
<item>
<title><![CDATA[Timestamp your Notepad]]></title>
<link>http://swethasankaran.wordpress.com/2009/09/08/timestamp-your-notepad/</link>
<pubDate>Tue, 08 Sep 2009 19:01:18 +0000</pubDate>
<dc:creator>Swetha Sankaran</dc:creator>
<guid>http://swethasankaran.wordpress.com/2009/09/08/timestamp-your-notepad/</guid>
<description><![CDATA[Create a blank text file in Notepad Type .LOG in the first line of the file. Press ENTER(carriage re]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><ol>
<li>Create a blank text file in Notepad</li>
<li>Type .LOG in the first line of the file.</li>
<li>Press ENTER(carriage return)</li>
<li>Save the file with any name of your choice.</li>
<li>Open the file again and notice the time stamp at the top.</li>
</ol>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Converting Perfmon timestamps to a readable format in Excel]]></title>
<link>http://thebackroomtech.com/2009/08/06/converting-perfmon-timestamps-to-a-readable-format-in-excel/</link>
<pubDate>Thu, 06 Aug 2009 19:13:40 +0000</pubDate>
<dc:creator>Julie</dc:creator>
<guid>http://thebackroomtech.com/2009/08/06/converting-perfmon-timestamps-to-a-readable-format-in-excel/</guid>
<description><![CDATA[I have been using Microsoft&#8217;s Performance Monitor (perfmon) to capture data that hopefully all]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have been using Microsoft&#8217;s Performance Monitor (perfmon) to capture data that hopefully allow me to understand the I/O bottleneck my Windows 2003 R2 server is experiencing only occasionally.</p>
<div>I&#8217;ve saved this data as a .csv file, and import it into Excel so I can analyze the raw data.  The problem is, the timestamp column is in some indecipherable format that doesn&#8217;t map to actual time.</div>
<div> </div>
<div>I did some playing around with the cell formating in Excel, and this is how I was able to get the Perfmon timestamp displayed in a usable format. I&#8217;m using Excel 2002 in this example, so you may need to adapt the instructions to your environment. </div>
<div> </div>
<div>1.  Import the Perfmon .csv file into Excel</div>
<div> </div>
<div>2.  Right click the timestamp column, which is column A for me</div>
<div> </div>
<div>3.  Select <em>Format Cells</em></div>
<div> </div>
<div>4.  On the <em>Number</em> tab, select <em>Custom</em> Category</div>
<div> </div>
<div>5.  In the <em>Type</em> box, enter the following:</div>
<div>   </div>
<div>     <em>MM/dd/yyyy hh:mm:ss</em></div>
<div> </div>
<div>Note there is a space between the yyyy and hh</div>
<div> </div>
<div>Press OK, and your time stamp column should now be in a human readable format!</div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Entity Framework: TimeStamp fields not recognized for optimistic concurrency model]]></title>
<link>http://smehrozalam.wordpress.com/2009/08/05/entity-framework-timestamp-fields-not-recognized-for-optimistic-concurrency-model/</link>
<pubDate>Wed, 05 Aug 2009 10:53:51 +0000</pubDate>
<dc:creator>Syed Mehroz Alam</dc:creator>
<guid>http://smehrozalam.wordpress.com/2009/08/05/entity-framework-timestamp-fields-not-recognized-for-optimistic-concurrency-model/</guid>
<description><![CDATA[Today, while working with Entity Framework, I noticed through SQL Profiler that my update queries we]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Today, while working with Entity Framework, I noticed through SQL Profiler that my update queries were not using timestamp field. I looked into my model and found that my timestamp fields have <code>Concurrency Mode</code> property set to <code>None</code>. It was quite strange; The entity model was auto generated and I wonder why the EF designer could not identify my timestamp field (I remember Linq To SQL designer automatically took care of such fields). Anyway, I changed <strong>Concurrency Mode</strong> to <strong>Fixed</strong> and it worked great. So, as a final note, when generating entity model from database, don’t forget to set appropriate concurrency modes for your timestamp fields as it is not done by the designer itself.</p>
<p><a href="http://smehrozalam.wordpress.com/files/2009/08/timestamp.jpg"><img src="http://smehrozalam.wordpress.com/files/2009/08/timestamp.jpg" alt="setting concurrency mode for timestamp field" title="setting concurrency mode for timestamp field" width="263" height="229" class="alignnone size-full wp-image-585" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Añadir timestamp al nombre de un fichero mediante Java mapping]]></title>
<link>http://tykall.wordpress.com/2009/07/28/anadir-timestamp-al-nombre-de-un-fichero-mediante-java-mapping/</link>
<pubDate>Tue, 28 Jul 2009 12:51:24 +0000</pubDate>
<dc:creator>tykall</dc:creator>
<guid>http://tykall.wordpress.com/2009/07/28/anadir-timestamp-al-nombre-de-un-fichero-mediante-java-mapping/</guid>
<description><![CDATA[En el siguiente código se muestra cómo añadir el timestamp al nombre de un fichero a través de una U]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>En el siguiente código se muestra cómo añadir el timestamp al nombre de un fichero a través de una UDF (User-Defined Function) mediante acceso a las variables del sistema.</p>
<pre style="padding-left:30px;">DynamicConfiguration conf = (DynamicConfiguration) container
 .getTransformationParameters()
 .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create(
 "http:/"+"/sap.com/xi/XI/System/File",
 "FileName");

String FileName = filename[0];
String addTS = addTimestamp[0];
String TS;
java.util.Map map;
// get runtime constant map
map = container.getTransformationParameters();
// get value of header field
TS = (String) map.get(StreamTransformationConstants.TIME_SENT);

if(addTS.equals("X")){
 FileName = FileName + ".backup-" + TS;
};

conf.put(key, FileName);
result.addValue(FileName);</pre>
<p>Como variables de entrada tenemos el nombre del fichero y un indicador (addTimestamp) para decidir si hay que incluir el timestamp o no.</p>
<p>Enlaces de referencia:</p>
<ul>
<li><a href="http://help.sap.com/saphelp_nw04/Helpdata/EN/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm">Special Access to Mapping Runtime Constants</a></li>
<li><a href="http://help.sap.com/saphelp_nw04/Helpdata/EN/e2/e13fcd80fe47768df001a558ed10b6/content.htm">Java Mapping</a></li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[touch - modyfikacja czasu dostępu do pliku, tworzenie plików]]></title>
<link>http://sylwekb.wordpress.com/2009/07/21/touch-modyfikacja-czasu-dostepu-do-pliku-tworzenie-plikow/</link>
<pubDate>Tue, 21 Jul 2009 19:57:46 +0000</pubDate>
<dc:creator>sylwekb</dc:creator>
<guid>http://sylwekb.wordpress.com/2009/07/21/touch-modyfikacja-czasu-dostepu-do-pliku-tworzenie-plikow/</guid>
<description><![CDATA[Cześć, Teraz zaprezentuje Państwu polecenie touch. Jak wynika za samego tytułu wpisu polecenie to ma]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Cześć,</p>
<p>Teraz zaprezentuje Państwu polecenie touch. Jak wynika za samego tytułu wpisu polecenie to ma służyć do zmiany daty modyfikacji pliku, ale również dzięki temu poleceniu możemy tworzyć nowe pliki.</p>
<p>Składnia polecenia jest następująca:</p>
<pre><span style="color:#ff0000;">touch [opcje] plik<!--more--></span></pre>
<p>Postaram się teraz przybliżyć bardziej przydatne opcje:</p>
<p><span style="color:#008000;">-m &#8211; <span style="color:#000000;">zmienia czas modyfikacji pliku</span></span></p>
<p><span style="color:#008000;">-c &#8211; <span style="color:#000000;">nie powoduje utworzenia nowego pliku</span></span></p>
<p><span style="color:#008000;">-d data &#8211; <span style="color:#000000;">s</span><span style="color:#000000;"><span style="color:#000000;">kutku</span>je ustawieniem daty przyjętym w parametrze, a nie czas obecny, format daty jest następujący rrrrmmdd (r rok, m miesiąc, d dzień)</span></span></p>
<p><span style="color:#008000;">-t data -<span style="color:#000000;"> tutaj jest używany podobnie jak w przypadku opcji d czas podany w parametrze data zamiast czasu obecnego. Z tym, że w odróżnieniu od opcji d jest inny format czasu: [[RR]RR]MMDDhhmm[.ss] (h godzina, m minuta, s sekundy)</span></span></p>
<p><span style="color:#008000;">-r plik_wzorcowy &#8211; <span style="color:#000000;">możny również do zmiany daty modyfikacji pliku użyć pliku wzorcowego</span></span></p>
<p>Z opisu teoretycznego to było by na tyle więc przyszedł czas na przykłady:</p>
<p><span style="color:#000000;"><span style="color:#800000;">touch plik1</span> &#8211; spowoduje utworzenie pliku o nazwie plik1</span></p>
<p><span style="color:#000000;"><span style="color:#800000;">touch -d 20090125 plik1</span> &#8211; spowoduje utworzenie pliku o nazwie plik1 i datą 25 stycznia 2009 roku. Jeżeli taki plik istnieje zostanie zmieniony czas modyfikacji pliku</span></p>
<p><span style="color:#000000;"><span style="color:#800000;">touch -c -d 20091224 plik2</span> &#8211; tutaj zaistniała sytuacja podobna do przykładu wyżej, ale jeżeli plik o nazwie plik2 nie istnieje to wówczas nie zostanie on utworzony</span></p>
<p><span style="color:#000000;"><span style="color:#800000;">touch -m plik*</span> &#8211; nastąpi zmiana czasu modyfikacji (dla wszystkich plików zwierających na początku nazwy treść &#8220;plik&#8221;) na czas obecny</span></p>
<p><span style="color:#000000;">To wszytko co miało dotyczyć polecenia touch. Zachęcam do przeczytania podręcznika man lub info. (polecenie man touch, info touch)</span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Linux: Timestamp conversion methods]]></title>
<link>http://mohammednv.wordpress.com/2009/06/26/linux-timestamp-conversion-methods/</link>
<pubDate>Fri, 26 Jun 2009 03:34:13 +0000</pubDate>
<dc:creator>Mohammed</dc:creator>
<guid>http://mohammednv.wordpress.com/2009/06/26/linux-timestamp-conversion-methods/</guid>
<description><![CDATA[A timestamp is a sequence of characters, denoting the date and/or time at which a certain event occu]]></description>
<content:encoded><![CDATA[A timestamp is a sequence of characters, denoting the date and/or time at which a certain event occu]]></content:encoded>
</item>
<item>
<title><![CDATA[Tips: Where Did the Time Go? D6 and the UTC Timestamp]]></title>
<link>http://wordofpie.com/2009/06/20/tips-where-did-the-time-go-d6-and-the-utc-timestamp/</link>
<pubDate>Sat, 20 Jun 2009 02:29:14 +0000</pubDate>
<dc:creator>Pie</dc:creator>
<guid>http://wordofpie.com/2009/06/20/tips-where-did-the-time-go-d6-and-the-utc-timestamp/</guid>
<description><![CDATA[I had planned to start running all of my &#8220;Tips&#8221; posts in the EMC Developer Network, but ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I had planned to start running all of my &#8220;Tips&#8221; posts in the EMC Developer Network, but I wanted to editorialize a little in this Tip, so I&#8217;ve decided to throw it up here.  This issue arose when I installed a new repository into an existing environment.  It is a documented issue, though the Support guys need to read that documentation a little more closely.</p>
<h4>The Time Warp</h4>
<p><!--more--></p>
<p>As you may have guessed from the title, I recently ran into an issue regarding the Timestamp in the Documentum Content Server.  We were looking at an update to a system and we noticed that the times in our little <a href="http://wordofpie.com/2008/07/09/tips-taming-the-documentum-audit-trail/">Data Shack</a> were wrong, by about 5 hours.  We looked in the source Audit Trail in Documentum and we saw that both the <strong><span style="font-family:Courier New;color:#0000ff;">time_stamp</span></strong> field and the <span style="font-family:Courier New;color:#0000ff;"><strong>time_stamp_utc</strong></span> field in the <span style="font-family:Courier New;color:#0000ff;"><strong>dm_audittrail_s</strong></span> table had the same value.</p>
<p>I had the team open a case with EMC Support and they quickly got nowhere.</p>
<p>After a few days, and a little thought, I browsed through some documentation and found this nugget in the Content Server Administration Guide:</p>
<blockquote><p>By default, date values are stored as follows:</p>
<ul>
<li>As UTC (Coordinated Universal Time) time in new repositories (Documentum 6 and later).</li>
<li>As the Content Server’s local time in repositories that are upgraded from before version 6.</li>
</ul>
</blockquote>
<p>This made sense.  We had rebuilt our development repository recently to clean it up, and so the date handling had changed.  Mystery solved! Time to call it a day?</p>
<p>No.</p>
<p>The problem was that in every other environment, there was an existing repository that already handled dates in local time. The plan was to create a new repository for a specialized type of content.  That repository would have the new rule, but the repository dates wouldn&#8217;t match, making reporting a little nightmarish.</p>
<p>Support had told us that everything was working as intended and closed the case without so much as a by-your-leave. My thought was that if two repositories running the same version of the software can behave in two different manners, there has to be a flag. The Administration Guide mentioned a field titled <strong><span style="font-family:Courier New;color:#0000ff;">r_normal_tz</span></strong>.  What was this field and where was it?</p>
<p>So the search was on.  After a bit of digging, a support note was uncovered. Support Note #98383, <a href="https://solutions.emc.com/emcsolutionview.asp?id=esg98383">Dates stored in Content Server V6.0 original install incorrectly calculate UTC time component offset in storing dates. Does not occur if content server was upgraded from 5.3 to 6.0</a>, explained how the setting could be changed.  The value is in stored the <span style="font-family:Courier New;color:#0000ff;"><strong>docbase_config</strong></span> object.  The documentation says that the field <strong><span style="color:#ff0000;">should not be changed if the value is not 0</span></strong>. I tend to agree with this assessment as it will probably throw things out of synch.</p>
<p>Lucky for me, the problem was that the field was set to 0.  I just had to issue a simple DQL (<span style="font-family:Courier New;color:#0000ff;"><strong>Update dm_docbase_config Object Set r_normal_tz = -18000</strong></span>) to update the value for the Eastern Time Zone (-5*60*60 as the value store the differential in seconds). This value was also confirmed in the existing repositories.  After the change, we just had to restart the repository.</p>
<p>Wallah! It worked and now all is well.  After writing some documentation to capture the knowledge, we called it a day.</p>
<h4>EMC Support Note Odds and Ends</h4>
<p>One thing that I realized when researching this issue was that the Support Note numbering system was about to break the 100,000 mark. I decided to find the first note with a 6-digit number.  Using the URL format, https: //solutions.emc.com/emcsolutionview.asp?id=esg######, I started at 100,000 and on my fourth attempt, found the first PUBLIC note&#8230;</p>
<p>Support Note 100,003: <a href="https://solutions.emc.com/emcsolutionview.asp?id=esg100003">Documentum Composer fails to install value assistance when the value assistance for a parent type attribute has been overridden</a>. Written 25 September 2008, it outlines a bug that is fixed by upgrading Composer to 6.0 sp1. It isn&#8217;t a particularly useful note at this point, but worth commemorating.</p>
<p>I just hope I never see Support Note 1,000,000.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Include a time stamp with pings]]></title>
<link>http://adventuresintech.com/2009/06/17/include-a-time-stamp-with-pings/</link>
<pubDate>Wed, 17 Jun 2009 15:46:20 +0000</pubDate>
<dc:creator>Ross</dc:creator>
<guid>http://adventuresintech.com/2009/06/17/include-a-time-stamp-with-pings/</guid>
<description><![CDATA[It might be useful to include an absolute time stamp when pinging multiple hosts so as to be able to]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>It might be useful to include an absolute time stamp when pinging multiple hosts so as to be able to make a correspondance later on.  This is what I put together in a hurry that does the trick.</p>
<pre>while test 0; do  DATE=$( date &#124; tr -d '\n' ); \
PING=$( ping -c 1 192.168.1.100 &#124; grep from ); \
( echo $DATE $PING; sleep 1 ) &#124; tee -a /path/to/log ; done</pre>
<p>Got a better way to do this? Post a comment.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Auto Populate Time Stamp in SQL Server 2005 Express]]></title>
<link>http://khansalmanahmad.wordpress.com/2009/06/08/auto-populate-time-stamp-in-sql-server-2005-express/</link>
<pubDate>Mon, 08 Jun 2009 23:19:29 +0000</pubDate>
<dc:creator>khansalmanahmad</dc:creator>
<guid>http://khansalmanahmad.wordpress.com/2009/06/08/auto-populate-time-stamp-in-sql-server-2005-express/</guid>
<description><![CDATA[Recently I was experimenting with trying to modify a database by adding an auto-populating Time Stam]]></description>
<content:encoded><![CDATA[Recently I was experimenting with trying to modify a database by adding an auto-populating Time Stam]]></content:encoded>
</item>
<item>
<title><![CDATA[Connessione con HTTP Server]]></title>
<link>http://mmoracletips.wordpress.com/2009/05/29/connessione-con-http-server/</link>
<pubDate>Fri, 29 May 2009 14:40:47 +0000</pubDate>
<dc:creator>mmaggi75</dc:creator>
<guid>http://mmoracletips.wordpress.com/2009/05/29/connessione-con-http-server/</guid>
<description><![CDATA[&nbsp; Oracle può essere utilizzato per effettuare una connessione HTTP: mi è capitato di affrontare]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><table border="0">
<tr>
<td style="height:10px;">&#160;</td>
</tr>
</table>
<p>Oracle può essere utilizzato per effettuare una connessione HTTP: mi è capitato di affrontare un simile scenario quando ho dovuto &#8220;arricchire&#8221; dei dati a partire da informazioni che venivano erogate da un servizio di rete. Ho dovuto scrivere una routine <a href="http://mmoracletips.wordpress.com/files/2009/06/get_stream1.pdf" target="_blank">Get_Stream()</a> per recuperare l&#8217;XML dalla rete ed effettuare un <a href="http://mmoracletips.wordpress.com/2009/05/26/parsing-di-un-xml/">parsing</a> per estrarre i valori e caricarli nel database.<br />
<code></p>
<table cellspacing="2" cellpadding="2" border="0" width="100%">
<tr>
<td colspan="2">DECLARE</td>
</tr>
<tr>
<td style="width:10px;">&#160;</td>
<td>v_url VARCHAR2(255) := 'http://mysite.it:80';</td>
</tr>
<tr>
<td>
<td>v_clob CLOB;</td>
</tr>
<tr>
<td>
<td>v_size NUMBER;</td>
</tr>
<tr>
<td>
<td>v_time TIMESTAMP;</td>
</tr>
<tr>
<td>
<td>v_duration INTERVAL DAY TO SECOND;</td>
</tr>
<tr>
<td colspan="2">BEGIN</td>
</tr>
<tr>
<td>
<td>DBMS_OUTPUT.put_line('Connessione HTTP = ' &#124;&#124; v_url);</td>
</tr>
<tr>
<td>
<td>v_time := SYSTIMESTAMP;</td>
</tr>
<tr>
<td>
<td>PKG_UTILITY_HTTP.Get_Stream(v_url, v_clob);</td>
</tr>
<tr>
<td>
<td>v_duration := SYSTIMESTAMP - v_time;</td>
</tr>
<tr>
<td>
<td>v_size := DBMS_LOB.Getlength(v_clob);</td>
</tr>
<tr>
<td>
<td>DBMS_OUTPUT.put_line('Letti bytes ' &#124;&#124; v_size &#124;&#124; ' in ' &#124;&#124; v_duration);</td>
</tr>
<tr>
<td colspan="2">END;</td>
</tr>
</table>
<p></code><br />
L&#8217;apertura di una connessione TCP/IP verso un indirizzo esterno al database è un&#8217;operazione delicata, quindi non permessa di default. Eseguendo il codice precedente ci si può imbattere nell&#8217;eccezione:<br />
<code><br />
ORA-29273: richiesta HTTP non riuscita<br />
ORA-06512: a "SYS.UTL_HTTP", line xxxx<br />
ORA-24247: accesso alla rete negato dalla lista di controllo dell'accesso (ACL)<br />
ORA-06512: a line xxxx<br />
</code><br />
Bisogna dunque verificare che le <strong>Access Control Lists (ACL)</strong> del database consentano l&#8217;apertura di una connessione verso l&#8217;indirizzo &#8216;http://mysite.it&#8217; sulla porta 80.<br />
<code><br />
SELECT *<br />
FROM DBA_NETWORK_ACLS;<br />
&#160;<br />
</code></p>
<p><strong>NOTE</strong></p>
<ul>
<li>
La creazione/modifica di un&#8217;ACL può essere fatta solo da un utente con i privilegi DBA. Per maggiori informazioni consiglio gli articoli:<br />
<a href="http://www.oracle-base.com/articles/11g/FineGrainedAccessToNetworkServices_11gR1.php" target="_blank">Fine-Grained Access to Network Services in Oracle Database 11g </a> su oracle-base-com<br />
<a href="http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_networkacl_adm.htm" target="_blank">DBMS_NETWORK_ACL_ADMIN</a> su download.oracle.com
</li>
<li>
Quando ho incluso la procedura in un package, sono stato costretto a specificare la clausola <strong>AUTHID CURRENT_USER</strong> per poter utilizzare l&#8217;ACL precedentemente creata. Questo forza il package ad essere eseguito con i privilegi dell&#8217;utente effettivamente loggato e non con quelli dell&#8217;utente che ha creato il package.
</li>
</ul>
<table border="0">
<tr>
<td style="height:30px;">&#160;</td>
</tr>
</table>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Build Versioning Tip]]></title>
<link>http://leanbuilds.wordpress.com/2009/05/29/build-versioning-tip/</link>
<pubDate>Fri, 29 May 2009 14:18:08 +0000</pubDate>
<dc:creator>Jason Lenny</dc:creator>
<guid>http://leanbuilds.wordpress.com/2009/05/29/build-versioning-tip/</guid>
<description><![CDATA[One easy way to get more value out of your build system is to improve one of it&#8217;s fundamental ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>One easy way to get more value out of your build system is to improve one of it&#8217;s fundamental outputs: the build number.  Many of us have been using the basic major, minor, revision, increment format for years (I know I did!), but most build systems these days, especailly ones you&#8217;ve built yourself, can use any format you like.  A good one that I&#8217;ve used in the past is the following:</p>
<p style="padding-left:30px;"><strong>Template: </strong>(Major).(Minor)_(Branch Name)_(Datestamp).(DailyIncrement)</p>
<p style="padding-left:30px;"><strong>Build Number: </strong>3.4_Prod_20090529.3</p>
<p style="padding-left:30px;"><strong>Translation: </strong>Production Branch, 3.4 release, built on 05/29/09, was the third build of the day.</p>
<p>This provides a wealth of more information than the basic format.  Just from seeing the build number you know when it was built, what major/minor release it is associated with, and what branch it was built out of.  The only piece of information you&#8217;re losing versus the old method is the running total number of builds you&#8217;ve created since started the project, which is of questionable value anyway.</p>
<p>One issue you may run into if you are using Windows is that it expects the &#8220;File Version&#8221; value for assemblies to be in the 0,0,0,0 format.   A good way to get around this is to put major, minor, date (with the year removed), and increment in that field and then use the &#8220;Product Version&#8221; field for your expanded build number.  So, with the example above, you&#8217;d end up with a file version of <strong>3.4.529.3 </strong>which works great with the file version field.</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
