Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

Time Zone Problem in odoo

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
timezoneportalwebsite
8 Replies
55031 Tampilan
Avatar
Hilar Andikkadavath

I can see so many topics regarding timezone, still, it's not clear about its manipulations on odoo. And also need clarifications for the system behavior for portal users.
NB: - Psql stores DateTime in UTC

3
Avatar
Buang
OdooBot
Yes, you are right. We disscussed the same in the above. Datetime data in db is stored in and according to the users timezone it will get automatically converted and by this way we can handle users from different timezones. While loading the view odoo is actually adding tz context with the stored data. No need of any extra configurations to manage account and reports. 

On Fri, 30 Aug 2019, 11:02 pm Dmitry Somov, <dmitry.somov@gmail.com> wrote:

A new answer on Time Zone Problem in odoo has been posted. Click here to access the post :

See post

Sent by Odoo S.A. using Odoo.

Avatar
Anil Kesariya
Jawaban Terbai

Hilar,

Yes, system (database) captures time in UTC format just because odoo allows users to login from anywhere in the world and every person belongs to different country have different timezone.

So, odoo evaluates the time based on the logged in user's timezone. If you don't know about how to set the timezone in users, you can go user's form either from preferences or from setting open the particular user from which you are trying to logged in. system (odoo) will display time according to your (user's) set timezone.

Hope this answer may help you to more clear about timezone.

Regards,

Anil.

8
Avatar
Buang
Hilar Andikkadavath
Penulis

I know This and I mentioned that in question, thats only applicable on which user is using the orm methods, what is the case of public, and if you are fetching datas through query? Next case is for portal users, some times you have to fetch data as SUPERUSER and you can display data as in format of SUPERUSER TZ

Anil Kesariya

If you want to display the datetime info on website, you need to convert the manually in localise format. you can pytz lib to customise this.

This e.g. may help you.

from datetime import datetime

import pytz

user_tz = self.env.user.tz or pytz.utc

local = pytz.timezone(user_tz)

display_date_result = datetime.strftime(pytz.utc.localize(datetime.strptime(your_date_or_datetime_info, DEFAULT_SERVER_DATETIME_FORMAT)).astimezone(local),"%d/%m/%Y %H:%M%S")

try this.

Hilar Andikkadavath
Penulis

orm methods returns datetime data according to the users zone. Other cases I used momentJs. above method is also good

Anil Kesariya

@hilar, that's great if you can use momentJs.

Avatar
Ali mughal
Jawaban Terbai

In my scenario, I want to subtract two dates but when I fetch the date it gives me UTC time and date.  

#first import this library
from pytz import timezone
#convert the date string into object
now_utc_date=datetime.strptime(now_utc,"%Y-%m-%d %H:%M:%S")
print('utc date and time', now_utc_date)
# now i am changing timezone
now_dubai = now_utc_date.astimezone(timezone('Asia/Dubai'))
print('converted time',now_pacific.strftime("%Y-%m-%d %H:%M:%S")) I hope this code resolve the error
0
Avatar
Buang
Avatar
Dmitry Somov
Jawaban Terbai

It has been discussed in the community for a while:
https://www.odoo.com/forum/help-1/question/time-zone-problem-in-odoo-118905
https://www.odoo.com/forum/help-1/question/user-timezone-not-applied-to-report-filters-9478
In my opinion there is a logic behind the default treatment of timezones in Odoo:
1) Transactions are recorded with UTC timestamp for all users (server time is UTC)
2) Transactions are displayed to users in their timezone (UTC +TZ delta)

Impacts:
1) For two users working in various timezones to have identical reports requires setting their time to UTC
2) Some transactions recorded same day (late hours) in Western timezones will be timestamped next day on server and will be shown in the reports for next day
3) Some transactions recorded same day (early hours) in Eastern timezones will be timestamped previous day on server and will be shown in the reports for previous day
4) Reports which do not take time as a parameter (only day) will be shown identical to all users. Some transactions from Western timezones day ends (local time) and Eastern timezones day starts (local time) won’t be shown.

Conclusion:
Accountants should be aware of this behavior and should setup their policies respectively:
1) For the reports taking DAY AND TIME as parameters they should login under a UTC-USER
2) For the reports taking only DAY as a parameter they may login either under a LOCAL TIMEZONE USER or under a UTC-USER

0
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
Error after changing some fields in 'my details' page.
portal website
Avatar
Avatar
1
Jan 23
2854
website.menu access rights for dedicated groups
portal website odoo17
Avatar
0
Feb 25
2207
Make an extranet in Odoo, with content, shop, portal... all only visible to customers who are logged in
portal website v17
Avatar
0
Sep 24
2030
Portal saves multiple inputs from dynamically generated list
portal input website
Avatar
0
Des 23
2135
website account details on portal_my_details
portal required website
Avatar
Avatar
2
Agu 22
4131
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now