Not able to change computer date

I am using Ubuntu on my computer and the date is Feb 2018. If I try to change the date using date command, my PC reboots and after reboot, date is same.. I reinstalled the os but it’s the same issue. It seems a hardware issue. Does anyone know what exactly issue is or how to debug further.?

jQuery and cf7 expiration date and dynamic auto populate

I have a WordPress site running Woocommerce which uses products as courses. I manually add a selection dropdown form in the description which shows the dates a course is available. I have jQuery script to auto populate a date form dynamically when the user selects a date within an enquiry form. I also have a script which checks for todays date and hides any expired date within the selection dropdown. But they don’t seem to work together. Can anyone take a look at the JSFiddle and work out why it doesn’t work? If there is anything missing or extra information required please do ask! This is pulling my hair out!

Select all entries where range of two DATETIME fields includes given date

I’m looking for a way to get all entries from my reservations table to be shown in a calendar.

Now I know that I will have to iterate over all days of the current week and run a database query to select all reservations with dt_from >= start_of_the_week / start_of_the_day and dt_to <= end_of_the_week / end_of_the_day.

But that only gives me the reservations that start or end within the week / respectively within the given day.

What I am trying to figure out is: How do I get the reservations which started earlier and/or end after the current day or week?

I have some kind of the following table design

+----+-------------------+---------------------+---------------------+ | ID | NAME | DT_FROM | DT_TO | +----+-------------------+---------------------+---------------------+ | 1 | Jeff Atwood | 2020-01-06 09:00:00 | 2020-01-16 09:00:00 | | 2 | Terry Jones | 2020-01-30 09:00:00 | 2020-02-16 09:00:00 | | 3 | Brian of Nazareth | 2020-02-06 09:00:00 | 2020-03-16 09:00:00 | +----+-------------------+---------------------+---------------------+

I have been stuck with this for a while now and would appreciate a push into the right direction.

Thank you 🙂

Criteria based estimation of a task’s due date

Basically we have a ticket system, each day we get multiple tickets with different categorization (Question,Change,Error) and importance (High,Mid,Low) for different customers (A,B,C). My job is to create some kind of a system determining the due date of these “tasks” based on

  • The state of the previous ones, completed or not.
  • The availability of the developers.
  • A criteria of the previously mentioned attributes (categorization,importance and customer type).

How can one achieve that?

Most efficient way to query a date range in Postgresql

I have a table with a timestamp with tz column. I want to perform a count / group by query for rows within a certain date range:

select count(1), url  from mytable  where viewed_at between '2019-01-01' and '2020-01-01'; 

viewed_at has a btree index applied, but when I view explain... it doesn’t appear to be using the index:

postgres=# explain select count(1), url from app_pageview where viewed_at < '2019-01-01' group by 2 order by 1 desc limit 10;                                                       QUERY PLAN                                                        -----------------------------------------------------------------------------------------------------------------------  Limit  (cost=2165636.99..2165637.02 rows=10 width=32)    ->  Sort  (cost=2165636.99..2165637.24 rows=101 width=32)          Sort Key: (count(1)) DESC          ->  Finalize GroupAggregate  (cost=2165609.22..2165634.81 rows=101 width=32)                Group Key: url                ->  Gather Merge  (cost=2165609.22..2165632.79 rows=202 width=32)                      Workers Planned: 2                      ->  Sort  (cost=2164609.20..2164609.45 rows=101 width=32)                            Sort Key: url                            ->  Partial HashAggregate  (cost=2164604.82..2164605.83 rows=101 width=32)                                  Group Key: url                                  ->  Parallel Seq Scan on app_pageview  (cost=0.00..2059295.33 rows=21061898 width=24)                                        Filter: (viewed_at < '2019-01-01 00:00:00+00'::timestamp with time zone)  JIT:    Functions: 13    Options: Inlining true, Optimization true, Expressions true, Deforming true (16 rows) 

I have generated ~100M rows of dummy data to test this out.

How can I make it more efficient?

Would storing the viewed_at field as two different fields be any use (date and time)

Is it possible to prove the content of a file hasn’t changed since certain date?

Today I make an archive file. Later I might want to send the archive file to somebody else, but when I send it, I want to be able to prove to the other person that I haven’t changed anything in it after today. Knowing that computer- and serverdates may be spoofed, can I do anything myself to assure this? Like including something or anything.

I’ve been thinking about hashes, but that doesn’t seem to fix the content in time. Only when I would have it registered at a notary, but that would be a bit oversized solution :-). And including the headlines of todays news would only prove it’s NOT unaltered since yesterday.

Can this be done, or is there any objective reasoning why this would not be possible?