date offset by 1 in docusaurus blog - docusaurus

I am using docusaurus v2 and created a blog file with the name containing the date I want it to be shown as the post date. However, the date in the generated blog is off by 1 day. Is this something to do with UTC vs local time? How do I make sure the date I give in the file name is the date it displays?

This is not yet resolved. There is an open issue here: https://github.com/facebook/docusaurus/issues/4881
It looks like it's related timezone conversion between UTC and local. A few people have posted temporary workarounds.

Related

How to convert timestamp to days?

I have my MySQL database inserting timestamp when I upload a record, so what's entered is something like 2020-04-02 16:59:29. Is there a Vue.Js way to convert that into something like 10 Days Ago? If so, can anyone give the code for conversion in Vue.Js?
I hold the fetched DB records in an object called data_local as in my bellow code.
Last Activity : {{data_local.updated_at}} days ago
Use moment.js, you can get your desired data the way you want. First do install moment and then import & use.
Below are ways to get days:
Ex-1:( This will provide you No_of_Days days ago ( e.g- 10 days ago)
moment("2020-04-02 16:59:29").fromNow()
Ex-2: (If you want only 10 days without ago then use below)
moment("2020-04-02 16:59:29").fromNow(true)
For more information visit https://momentjs.com/

Issue with Rally custom list with deep export (bug)

I am using Rally "Custom list With Deep export"
We have a field Planned end date. How ever while exporting it gives the result for next day in CSV format.
e.g: If the date is 31 December 2019 in Rally then in CSV it shows as 1 January 2020. Is it intended behavior? or a bug
Hmmm, is this related to the timezone that you are in? If your workspace timezone is different from your machine timezone, it can throw up oddities like this.
The app might not be timezone aware.

The datetime type is not retained when the query result is saved as csv

I am using the following query to fetch some results from a bigquery dataset:
SELECT name, TIMESTAMP(due) AS due, TIMESTAMP(start) AS start,
FROM myBigQueryTable
Then, I save the query result as csv. However, the due and start columns do not have datetime type in the csv file and displays a value like:
1.41E+09
instead of this:
2014-12-24 00:00:00 UTC
If I only use DATE instead of TIMESTAMP then the problem disappears, however I also need the time info. How can I resolve this issue?
This is a known problem with BigQuery UI and it is tracked here: https://issuetracker.google.com/issues/36614760.
I have the fix ready and it will go out into production within few weeks.

How do you get the ticket created date in trac?

I want to play with some really simple queries for a report, but I want to group everything by the creation date. The problem I am having is that time exists in the database, but not the date. From searching around in trac-related resources, it looks like I need to install trac.util.datefmt to be able to extract this information from datetime(time). I can find the API documentation for trac.util.datefmt, but not a download link to get the .egg.
Am I going in the right direction? If I can do what I need (i.e. get the creation month/day/year) without a plugin, what column do I use? I don't see anything else in the schema that is reasonable. If I do need trac.util.datefmt, where do I download it from? And if I really need a different plugin, which one should I be using?
I'll assume Trac >= 1.0. The time column is unix epoch time: the number of seconds that have elapsed since January 1st 1970. You can divide the value by 1e6 and put the value in a converter to see an example of extracting the datetime from the time column. trac.util.datefmt is part of the egg that ships with Trac, but since you are working with reports it doesn't sound like you need to know more about that function to accomplish your aim.
In a Trac report the time column will be automatically formatted as a date. You can look at the default report {1} as an example. I'm not sure how you intend to group by creation date. Do you wish to group tickets created in a certain datetime range?

set date closed trac ticket

I have a set of tickets that were managed via a primitive MS Excel sheet.
The worksheet was as follows
Opened Date | Closed Date | Ticket Content
I want to put them on trac in order to have a complete overview of the tickets opened-closed and the performance of the dev team. However out of the box trac doesn't allow me to set an opened/closed date for a ticket in the past.
Is there a solution for this ?
Some time ago I had a similar demand. I resolved it by batch-import with the help of TicketImportPlugin.
I used a custom field due_date of type text. Calculating POSIX (micro)second time stamp needed some custom formula, but worked sufficiently well. These numbers where imported, and I changed field type to date afterwards. Note that I used a patched Trac code, that entered Trac upstream for version 1.1dev meant for 1.2 now. Another option would be to use the DateFieldPlugin, that deals with date strings internally. But why bother, of you know, that you could use could get true custom time fields supported by Trac core right-away?
I did alter creation date/time too. This has been done by importing another custom field, and copying values back to the time column of ticket db table. A bit of dirty hand-work on configuration and database, but once figured out it worked like a charm and I had 3000+ issues of many years imported with historically correct time stamps in a few minutes.