| Author | 
		  Message
		 | 
		
		  | Omuch | 
		  
		    
			  
				 Posted: Mon Mar 11, 2013 5:07 am    Post subject: Casting Char to Timestamp | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 23 Mar 2012 Posts: 54
  
  | 
		  
		    
			  
				Hi
 
 
version 6.1.0.11
 
 
1. the LOCAL_TIMEZONE of the broker is 2 hours but when I run this:
 
 
   
	| Code: | 
   
  
	
 
DECLARE var CHARACTER CAST (CURRNET_TIMESTAMP AS CHARACTER  FORMAT 'IU') ;
 
 | 
   
 
 
 
(for example CURRNET_TIMESTAMP = 2013-03-11 14:00:00)
 
 
I get this :
 
   
	| Code: | 
   
  
	
 
var =2013-03-11T14:00:00[b]+05:30[/b]
 
 | 
   
 
 
in stand of +02:00
 
 
2.When i cast var to time stamp :
 
   
	| Code: | 
   
  
	
 
DECLARE time TIMESTAMP CAST(var AS TIMESTAMP FORMAT 'IU');
 
 | 
   
 
 
 
i get :
 
   
	| Code: | 
   
  
	
 
time = 2013-03-11 08:30:00
 
 | 
   
 
 
 
help please..
 
[/code] | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | lancelotlinc | 
		  
		    
			  
				 Posted: Mon Mar 11, 2013 10:09 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | adubya | 
		  
		    
			  
				 Posted: Mon Mar 11, 2013 11:20 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Partisan
 
 Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK 
  | 
		  
		    
			  
				| Can you paste in the output from mqsiservice -t in here ? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Omuch | 
		  
		    
			  
				 Posted: Mon Mar 11, 2013 1:02 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 23 Mar 2012 Posts: 54
  
  | 
		  
		    
			  
				
 
 
I alredy read it, didnt help much. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Omuch | 
		  
		    
			  
				 Posted: Wed Mar 13, 2013 12:07 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 23 Mar 2012 Posts: 54
  
  | 
		  
		    
			  
				
   
	| adubya wrote: | 
   
  
	| Can you paste in the output from mqsiservice -t in here ? | 
   
 
 
 
I ran it and it shows:
 
   
	| Code: | 
   
  
	
 
local time = real time
 
UTC time  = two hours back
 
standard offset from GMT=330
 
 | 
   
 
 
how can i change it?[/code] | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | rekarm01 | 
		  
		    
			  
				 Posted: Wed Mar 13, 2013 10:48 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 1415
  
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Omuch | 
		  
		    
			  
				 Posted: Thu Mar 14, 2013 9:22 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 23 Mar 2012 Posts: 54
  
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |