carrismetropolitana / website Goto Github PK
View Code? Open in Web Editor NEWCarris Metropolitana Website
Home Page: https://beta.carrismetropolitana.pt
Carris Metropolitana Website
Home Page: https://beta.carrismetropolitana.pt
As melhoras para a linha 4701 ainda não aparecem no site e o PDF aí (mas parece-me que também com ao menos uma parte do resto) duplica os dias úteis do tempo escolar nos domingos/feriados erradamente. Duvido onde pôr isto e imagino que seja resolvido em tempo, mas já que chegamos muito perto à data da introdução destas mudanças, parecia-me apto indicar aqui...
The issue with the code is that you are formatting the time using the toFormat
method, but you are not actually converting the dateTimeObject
to the 'Europe/Lisbon' time zone.
To fix this, you need to chain the setZone
method before formatting the time. Here's the corrected code:
const dateTimeObject = DateTime.fromSeconds(item.scheduled_arrival_unix, { zone: 'UTC' });
return `${dateTimeObject.setZone('Europe/Lisbon').toFormat('HH:mm')}`;
Explanation:
DateTime.fromSeconds(item.scheduled_arrival_unix, { zone: 'UTC' })
creates a DateTime
object from the Unix timestamp, assuming it represents a UTC time.setZone('Europe/Lisbon')
converts the DateTime
object to the 'Europe/Lisbon' time zone.toFormat('HH:mm')
formats the time in the 'HH:mm' format (hours and minutes).By chaining setZone
before toFormat
, you ensure that the time is converted to the desired time zone before formatting it.
Also, note that you don't need to specify the time zone in the toFormat
method since you have already set the time zone using setZone
. The toFormat('HH:mm')
will format the time according to the time zone set by setZone
.
With these changes, the code should correctly return the time in the 'Europe/Lisbon' time zone.
The line
Line 37 in 5ba3ae3
is overriden by the import in
Line 3 in 5ba3ae3
which matches the CSS universal selector and an improperly declared reference to the imported font:
website/nextjs/styles/reset.css
Lines 24 to 28 in 5ba3ae3
Consider rewriting the reset.css line 28 to instead:
font-family: var(--font-inter), sans-serif;
which keeps the operating system fallback and according to next-js documentation, is populated by the correct font per https://nextjs.org/docs/pages/api-reference/components/font#css-variables which you have already set here
Line 21 in 5ba3ae3
Thank you.
See #12
Por alguma razão o Safari insiste em mostrar isto só com um digito. Não que eu ache que tenhas cometido um erro, só que é estúpido da parte desse browser.
Mas tenho uma solução para ti: gera a hora normalmente no formato HH:mm, e depois, divide os componentes pelos dois pontos, assim.
const now = new Date().toLocaleString('pt-PT', {
timeZone: 'Europe/Lisbon',
hour: '2-digit',
minute: '2-digit'
});
const [hours, minutes] = now.split(':');
Assim já podes usar
{hours}<span>:</span>{minutes}
à vontade.
Coisas para fazer:
Lançamento (21 de Setembro)
Upgrade 1 (28 de Setembro)
Upgrade 2 (5 de Outubro)
Upgrade 3 (12 de Outubro)
(sem data)
Exmos/as senhores/as
Porque desapareceram as tabelas do vosso site?
Supõe-se que a vantagem da Carris Metropolitana é facilitar a vida do passageiro, corrigindo o que está mal mas mantendo o que é prático e funcionava bastante bem.
Atualmente, é necessário estar a procurar o horário linha-a-linha, dia-a-dia, percurso-a-percurso, variante-a-variante, etc etc, o que não é prático e torna-se irritante pelo tempo e perícia digital que é necessário ter. Em carreiras como a 1601 (em que é preciso ver na 1602 e na 1530) é complexo ter uma informação correta, respeitante à noção do funcionamento da carreira.
Reponham os horários normais, como por exemplo aqui, para que não seja preciso estar sempre a telefonar para a linha de apoio ou estar constantemente a recorrer ao computador/telemóvel de cada vez que se precise de saber um horário.
https://horarios.carrismetropolitana.pt/wp-content/themes/carrismetropolitana/horarios/1601/Linha_1601_050007.pdf
Grato
Venho propor a implementação de uma opção de se ver o horário de uma dada linha que inclua também os horários de todas as variantes.
Atualmente só se consegue ter este tipo de visualização através dos horários em formato em pdf.
No entanto, esta via tem os seus problemas uma vez que os pdfs ou não estão disponíveis ou não estão atualizados.
Este tipo de visualização é particularmente útil para linhas que tenham várias alíneas pois permite uma leitura mais fácil das frequências que uma dada linha tem.
DONE ✅
IN PROGRESS ⚙️
NEXT 💡
This line crashes (undefined) if path is an empty list, but the trip has its own path, as may happen in malformed api responses/gtfs
Crashing on a single line will stop the entire UI or any other service on that stop from being displayed.
Greetings,
When seeing the state of a current line, it would be helpful if instead of selecting a single course through the dropdown, I could select multiple courses (through a checkbox/toggle mechanism).
For instance, in line 1601, I personally am not concerned with whether a bus passes through the "Rotunda do Centro Comercial", because that course change doesn't affect the stops that I use.
Obviously this is not the case for every user, hence the toggle ability. I would be able to pick and choose the courses of the line that take me from my origin to my destination, and see the state of the line like that.
Uma coisa que se perdeu com a entrada da operação da Carris Metropolitana foi a consulta de horários numa lógica de eixo invés de uma consulta por linha individual. Esta questão é particularmente relevante em deslocações do tipo interurbano (e.g. Loures norte rural e Mafra) onde certas linhas e/ou variantes são poucas mas em conjunto servem muito um eixo comum.
Em concreto, proponho o seguinte "roadmap":
Relativamente ao ponto 0 faço o apelo para que se use este ticket para se discutir com a comunidade sobre que eixos serão relevantes de se implementar.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.