473,586 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Time zone string not showing

Hi all,

I want to have the time zone string (like 'BRT') displayed after a
date-time. The date column is of the type timestamp with time zone. But
the time zone is not displayed.

It works for a timestamp without time zone column:
# select to_char(timesta mp '2001-02-16 20:38:40' at time zone 'BRT',
'HH24:MI DD/MM/YYYY TZ');
to_char
----------------------
23:38 16/02/2001 UTC

It does not work for a timestamp with time zone column:
# select to_char(timesta mp with time zone '2001-02-16 20:38:40-05' at
time zone 'BRT', 'HH24:MI DD/MM/YYYY TZ');
to_char
-------------------
22:38 16/02/2001

Is it the expected behavior? Should I just append the time zone
string? The problem is it could be 'BRT' or 'BRST' depending on the
date.

Regards,
Clodoaldo Pinto

_______________ _______________ _______________ __________
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade!
http://br.acesso.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #1
1 2315
=?iso-8859-1?q?Clodoaldo=2 0Pinto=20Neto?= <cl************ *@yahoo.com.br> writes:
It does not work for a timestamp with time zone column:
# select to_char(timesta mp with time zone '2001-02-16 20:38:40-05' at
time zone 'BRT', 'HH24:MI DD/MM/YYYY TZ');
to_char
-------------------
22:38 16/02/2001 Is it the expected behavior?


Yes. AT TIME ZONE converts a timestamp without time zone to a timestamp
with time zone, or vice versa.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3962
by: Jonatan Fernstad | last post by:
I am using the JavaMail API to send email. It seems the Message.setSentDate(new Date()) sets wrong time zone. I am at GMT+1, and this is also what the new Date() is showing. But when the message arrives the header is showing it as GMT+2. It is always showing one time zone higher also if I change my time zone to something else in windows.
8
9240
by: Monty | last post by:
Let's say you provide an online service from 7:00AM to 6:00PM Eastern Time (daylight time in the summer). Is there way of showing these hours of availability on a web page in the user's local time? Thanks in advance for any advice.
7
1588
by: WindAndWaves | last post by:
Hi Gurus Is it possible to display the time on a site using javascript. I want to show visitors the current time in New Zealand, but the javascript that I use actually displays the time on the users computer (i.e. completely useless). Any ideas greatly appreciated Thanks in advance
1
11673
by: heirou | last post by:
I'm a novice in this subject....I've made a database that requires a time conversion. For example, if local time is 1200, determine the time in Korea. I use two fields: a date field, and a time field. I need the converted time to show up in a report. I also need the corresponding date to increment if necessary. Any ideas on how to do...
3
35069
by: Jon Davis | last post by:
The date string: "Thu, 17 Jul 2003 12:35:18 PST" The problem: // this fails on PST DateTime myDate = DateTime.Parse("Thu, 17 Jul 2003 12:35:18 PST"); Help? Jon
23
3726
by: Randall Nortman | last post by:
I assume I'm not the first person to have encountered this, but I couldn't find anything in the FAQ or on the mailing lists recently. My apologies if this is already documented somewhere... My application logs data to a Postgres table continuously (once every 15 seconds), maintaining a persistent connection. Each datum is logged with a...
15
2001
by: Cesar Ronchese | last post by:
Hi, I built the sample code showing the problem with dates when viewed at different machines, different Time Zones and transported via Remoting. The zip can be downloaded here: www.carsoftnet.com.br/temp/sample_error_date.zip
3
2739
by: Satish Itty | last post by:
Hi all, I have a big problem in my hands and not sure how I can fix this. Any suggestions would be greatly appreciated. I have a .NET 3 tier app developed in VS2003 and .NET 1.1. the client is a windows application and middle tier runs on IIS. Data is passed between the client and middle tier as DataSets and custom value object classes. The...
5
4045
by: Omer | last post by:
hi Everyone, I am using ASP.Net 2.0. When user logins, I check the credential and then made the cookie. My hoster's server is in Arizona region and I am in Pakistan. I set cookie's expiration time as 4 hours. It works perfectly fine on my PC and many other PCs which have correct time. But, if I set date to some old date, user is simply unable...
0
7915
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7841
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8204
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7965
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6617
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1184
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.